form-cheatsheet/js/polyfills/Dom/Element.outerHTML.min.js
2016-10-10 12:02:31 -04:00

4 lines
1.0 KiB
JavaScript

"undefined"===typeof document||"undefined"===typeof document.createElementNS||"outerHTML"in document.createElementNS("http://www.w3.org/1999/xhtml","_")||function(a){function e(b){var a=this.parentNode;if(null===a)throw DOMException.a=DOMException.NOT_FOUND_ERR,DOMException;for(c.innerHTML=b;b=c.firstChild;)a.insertBefore(b,this);a.removeChild(this)}function f(){var a;if(document.xmlVersion)return g.serializeToString(this);c.appendChild(this.cloneNode(!1));a=c.innerHTML.replace("><",">"+this.innerHTML+
"<");c.innerHTML="";return a}var c=document.createElementNS("http://www.w3.org/1999/xhtml","_");a=(a.HTMLElement||a.Element).prototype;var g=new XMLSerializer;if(Object.defineProperty){var d={get:f,set:e,enumerable:!0,configurable:!0};try{Object.defineProperty(a,"outerHTML",d)}catch(b){-2146823252===b.b&&(d.enumerable=!1,Object.defineProperty(a,"outerHTML",d))}}else Object.prototype.__defineGetter__&&Object.prototype.__defineSetter__&&(a.__defineGetter__("outerHTML",f),a.__defineSetter__("outerHTML",
e))}(self);
//# sourceMappingURL=Element.outerHTML.min.js.map