Browse Source

fix: warning when worldSafeExecuteJavaScript is disabled (#27974)

Milan Burda 4 years ago
parent
commit
581b47582f
1 changed files with 1 additions and 1 deletions
  1. 1 1
      lib/renderer/api/web-frame.ts

+ 1 - 1
lib/renderer/api/web-frame.ts

@@ -49,7 +49,7 @@ class WebFrame extends EventEmitter {
 }
 
 const { hasSwitch } = process.electronBinding('command_line');
-const worldSafeJS = hasSwitch('world-safe-execute-javascript') && hasSwitch('context-isolation');
+const worldSafeJS = hasSwitch('world-safe-execute-javascript') || !hasSwitch('context-isolation');
 
 // Populate the methods.
 for (const name in binding) {