Sha256: e182a9920b3b3548b996e67df0d6c7f4247e0663fef8ac5069f5620a1fb1ca24
Contents?: true
Size: 1.76 KB
Versions: 23
Compression:
Stored size: 1.76 KB
Contents
I"þ(function() { var DOMParser; DOMParser = (function() { function DOMParser() {} DOMParser.prototype.parse = function(html) { return this._get_parser()(html); }; DOMParser.prototype._get_parser = function() { return this._document_parser != null ? this._document_parser : this._document_parser = this._parser_factory(); }; DOMParser.prototype._parser_factory = function() { var create_document_using_DOM, create_document_using_parser, create_document_using_write, e, ref, testDoc; create_document_using_parser = function(html) { return (new DOMParser).parseFromString(html, 'text/html'); }; create_document_using_DOM = function(html) { var doc; doc = document.implementation.createHTMLDocument(''); doc.documentElement.innerHTML = html; return doc; }; create_document_using_write = function(html) { var doc; doc = document.implementation.createHTMLDocument(''); doc.open('replace'); doc.write(html); doc.close(); return doc; }; try { if (window.DOMParser) { testDoc = create_document_using_parser('<html><body><p>test'); return create_document_using_parser; } } catch (_error) { e = _error; testDoc = create_document_using_DOM('<html><body><p>test'); return create_document_using_DOM; } finally { if ((testDoc != null ? (ref = testDoc.body) != null ? ref.childNodes.length : void 0 : void 0) !== 1) { return create_document_using_write; } } }; return DOMParser; })(); if (window._Wiselinks == null) { window._Wiselinks = {}; } window._Wiselinks.DOMParser = DOMParser; }).call(this); :ET
Version data entries
23 entries across 23 versions & 1 rubygems