single-file-core 1.6.23 → 1.6.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "single-file-core",
3
- "version": "1.6.23",
3
+ "version": "1.6.24",
4
4
  "description": "SingleFile Core",
5
5
  "author": "Gildas Lormeau",
6
6
  "license": "AGPL-3.0-or-later",
@@ -21,7 +21,7 @@
21
21
  * Source.
22
22
  */
23
23
 
24
- /* global DOMParser, setTimeout */
24
+ /* global setTimeout */
25
25
 
26
26
  export {
27
27
  display
@@ -50,7 +50,10 @@ async function display(document, docContent, { disableFramePointerEvents, inPlac
50
50
  }
51
51
  docContent = docContent.replace(/<noscript/gi, "<template disabled-noscript");
52
52
  docContent = docContent.replace(/<\/noscript/gi, "</template");
53
- const doc = (new DOMParser()).parseFromString(docContent, "text/html");
53
+ const doc = document.implementation.createHTMLDocument("");
54
+ doc.open();
55
+ doc.write(docContent);
56
+ doc.close();
54
57
  if (disableFramePointerEvents) {
55
58
  doc.querySelectorAll("iframe").forEach(element => {
56
59
  const pointerEvents = "pointer-events";