Enable setting javascript and contextIsolation via window.open
authorKevin Sawicki <kevinsawicki@gmail.com>
Fri, 21 Apr 2017 17:57:22 +0000 (10:57 -0700)
committerKevin Sawicki <kevinsawicki@gmail.com>
Tue, 25 Apr 2017 19:57:53 +0000 (12:57 -0700)
lib/browser/guest-window-manager.js

index e5bfa7412386739e7153a21985a4471e8010e81a..e96fc12ac585952e93f5d7bd248a56a00ba0ba61 100644 (file)
@@ -48,7 +48,7 @@ const mergeBrowserWindowOptions = function (embedder, options) {
     options.webPreferences.nodeIntegration = false
   }
 
-  // Enable context isolation on child window if enable on parent window
+  // Enable context isolation on child window if enabled on parent window
   if (embedder.getWebPreferences().contextIsolation === true) {
     options.webPreferences.contextIsolation = true
   }
@@ -186,7 +186,7 @@ ipcMain.on('ELECTRON_GUEST_WINDOW_MANAGER_WINDOW_OPEN', (event, url, frameName,
   const options = {}
 
   const ints = ['x', 'y', 'width', 'height', 'minWidth', 'maxWidth', 'minHeight', 'maxHeight', 'zoomFactor']
-  const webPreferences = ['zoomFactor', 'nodeIntegration', 'preload']
+  const webPreferences = ['zoomFactor', 'nodeIntegration', 'preload', 'javascript', 'contextIsolation']
   const disposition = 'new-window'
 
   // Used to store additional features