MCPcopy Index your code
hub / github.com/keepfool/vue-tutorials / getOuterHTML

Function getOuterHTML

06.Router/basic/js/vue.js:1540–1548  ·  view source on GitHub ↗

* Get outerHTML of elements, taking care * of SVG elements in IE as well. * * @param {Element} el * @return {String}

(el)

Source from the content-addressed store, hash-verified

1538 */
1539
1540 function getOuterHTML(el) {
1541 if (el.outerHTML) {
1542 return el.outerHTML;
1543 } else {
1544 var container = document.createElement('div');
1545 container.appendChild(el.cloneNode(true));
1546 return container.innerHTML;
1547 }
1548 }
1549
1550 var commonTagRE = /^(div|p|span|img|a|b|i|br|ul|ol|li|h1|h2|h3|h4|h5|h6|code|pre|table|th|td|tr|form|label|input|select|option|nav|article|section|header|footer)$/i;
1551 var reservedTagRE = /^(slot|partial|component)$/i;

Callers 1

FragmentFactoryFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected