Browse Source

fix: extract getReadyState only when needed

tophf 2 weeks ago
parent
commit
0c36ea2fdc
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/injected/content/inject.js

+ 1 - 1
src/injected/content/inject.js

@@ -154,7 +154,7 @@ export async function injectScripts(data, info, isXml) {
       [MORE]: more,
       [MORE]: more,
       url: IS_FIREFOX && location.href,
       url: IS_FIREFOX && location.href,
     });
     });
-  const getReadyState = describeProperty(Document[PROTO], 'readyState').get;
+  const getReadyState = more && describeProperty(Document[PROTO], 'readyState').get;
   const hasInvoker = contLists;
   const hasInvoker = contLists;
   if (hasInvoker) {
   if (hasInvoker) {
     setupContentInvoker();
     setupContentInvoker();