Browse Source

fix: add workaround for Firefox bug

close #269
Gerald 8 years ago
parent
commit
31bcbf73de
1 changed files with 3 additions and 1 deletions
  1. 3 1
      src/injected/index.js

+ 3 - 1
src/injected/index.js

@@ -7,6 +7,8 @@ import initialize from './content';
   if (window.VM) return;
   if (window.VM) return;
   window.VM = 1;
   window.VM = 1;
 
 
+  const { VM_initializeWeb } = window;
+
   function initBridge() {
   function initBridge() {
     const contentId = getUniqId();
     const contentId = getUniqId();
     const webId = getUniqId();
     const webId = getUniqId();
@@ -30,7 +32,7 @@ import initialize from './content';
       JSON.stringify(contentId),
       JSON.stringify(contentId),
       JSON.stringify(Object.keys(props)),
       JSON.stringify(Object.keys(props)),
     ];
     ];
-    inject(`(${window.VM_initializeWeb.toString()}())(${args.join(',')})`);
+    inject(`(${VM_initializeWeb.toString()}())(${args.join(',')})`);
   }
   }
 
 
   initBridge();
   initBridge();