Skip to content
This repository has been archived by the owner on Jan 27, 2021. It is now read-only.

Fix for removing unwanted body and head tags #12

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions winstore-jscompat.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -140,4 +146,4 @@

}

}());
}());