Quellcode durchsuchen

define globalThis object if undefined (see #643)

Gildas vor 4 Jahren
Ursprung
Commit
cbe1300644
1 geänderte Dateien mit 3 neuen und 0 gelöschten Zeilen
  1. 3 0
      lib/single-file/processors/hooks/content/content-hooks-frames.js

+ 3 - 0
lib/single-file/processors/hooks/content/content-hooks-frames.js

@@ -122,6 +122,9 @@ function loadDeferredImagesResetZoomLevel(options) {
 }
 
 function injectedScript() {
+	if (typeof globalThis == "undefined") {
+		window.globalThis = window;
+	}
 	const console = globalThis.console;
 	const dispatchEvent = event => globalThis.dispatchEvent(event);
 	const CustomEvent = globalThis.CustomEvent;