diff --git a/winstore-jscompat.js b/winstore-jscompat.js index 51711e5..6d8d35b 100644 --- a/winstore-jscompat.js +++ b/winstore-jscompat.js @@ -106,8 +106,14 @@ } } cleanseAttributes(cleaner.documentElement); + + var docElement = cleaner.documentElement.childNodes[1]; - return Array.prototype.slice.call(document.adoptNode(cleaner.documentElement).childNodes); + if (docElement == null) { + docElement = cleaner.documentElement; + } + + return Array.prototype.slice.call(document.adoptNode(docElement).childNodes); } function cleansePropertySetter(property, setter) { @@ -140,4 +146,4 @@ } -}()); \ No newline at end of file +}());