Browse Source

fix #2400: Firefox window != globalThis in content mode

tophf 2 weeks ago
parent
commit
67e549137c
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/injected/web/safe-globals.js

+ 1 - 1
src/injected/web/safe-globals.js

@@ -187,7 +187,7 @@ export const VAULT = (() => {
     builtinFuncs = res[i += 1] || (funcs => {
       // extracting commonly hijacked functions that still work when bound to a real `window`
       for (const key of ['setInterval', 'setTimeout']) {
-        funcs[key] = setPrototypeOf(describeProperty(src, key), null);
+        funcs[key] = setPrototypeOf(describeProperty(srcWindow, key), null);
       }
       return funcs;
     })(createNullObj()),