* Get outerHTML of elements, taking care * of SVG elements in IE as well. * * @param {Element} el * @return {String}
(el)
| 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; |