mirror of
https://github.com/finos/SymphonyElectron.git
synced 2025-02-25 18:55:29 -06:00
ELECTRON-430: Enable context isolation
1. Enables context isolation when creating any browser window instance.
This commit is contained in:
parent
b1209083cb
commit
2fb82e9d60
@ -20,6 +20,7 @@ let windowConfig = {
|
|||||||
titleBarStyle: true,
|
titleBarStyle: true,
|
||||||
resizable: false,
|
resizable: false,
|
||||||
webPreferences: {
|
webPreferences: {
|
||||||
|
contextIsolation: true,
|
||||||
preload: path.join(__dirname, 'renderer.js'),
|
preload: path.join(__dirname, 'renderer.js'),
|
||||||
sandbox: true,
|
sandbox: true,
|
||||||
nodeIntegration: false
|
nodeIntegration: false
|
||||||
|
@ -23,6 +23,7 @@ let windowConfig = {
|
|||||||
titleBarStyle: true,
|
titleBarStyle: true,
|
||||||
resizable: false,
|
resizable: false,
|
||||||
webPreferences: {
|
webPreferences: {
|
||||||
|
contextIsolation: true,
|
||||||
preload: path.join(__dirname, 'renderer.js'),
|
preload: path.join(__dirname, 'renderer.js'),
|
||||||
sandbox: true,
|
sandbox: true,
|
||||||
nodeIntegration: false
|
nodeIntegration: false
|
||||||
|
@ -24,6 +24,7 @@ let windowConfig = {
|
|||||||
resizable: false,
|
resizable: false,
|
||||||
alwaysOnTop: true,
|
alwaysOnTop: true,
|
||||||
webPreferences: {
|
webPreferences: {
|
||||||
|
contextIsolation: true,
|
||||||
preload: path.join(__dirname, 'renderer.js'),
|
preload: path.join(__dirname, 'renderer.js'),
|
||||||
sandbox: true,
|
sandbox: true,
|
||||||
nodeIntegration: false
|
nodeIntegration: false
|
||||||
|
@ -136,6 +136,7 @@ let config = {
|
|||||||
transparent: true,
|
transparent: true,
|
||||||
acceptFirstMouse: true,
|
acceptFirstMouse: true,
|
||||||
webPreferences: {
|
webPreferences: {
|
||||||
|
contextIsolation: true,
|
||||||
preload: path.join(__dirname, 'electron-notify-preload.js'),
|
preload: path.join(__dirname, 'electron-notify-preload.js'),
|
||||||
sandbox: sandboxed,
|
sandbox: sandboxed,
|
||||||
nodeIntegration: isNodeEnv
|
nodeIntegration: isNodeEnv
|
||||||
|
@ -27,6 +27,7 @@ let windowConfig = {
|
|||||||
autoHideMenuBar: true,
|
autoHideMenuBar: true,
|
||||||
resizable: false,
|
resizable: false,
|
||||||
webPreferences: {
|
webPreferences: {
|
||||||
|
contextIsolation: true,
|
||||||
preload: path.join(__dirname, 'configure-notification-position-preload.js'),
|
preload: path.join(__dirname, 'configure-notification-position-preload.js'),
|
||||||
sandbox: sandboxed,
|
sandbox: sandboxed,
|
||||||
nodeIntegration: false
|
nodeIntegration: false
|
||||||
|
@ -130,6 +130,7 @@ function doCreateMainWindow(initialUrl, initialBounds, isCustomTitleBar) {
|
|||||||
alwaysOnTop: false,
|
alwaysOnTop: false,
|
||||||
webPreferences: {
|
webPreferences: {
|
||||||
sandbox: sandboxed,
|
sandbox: sandboxed,
|
||||||
|
contextIsolation: true,
|
||||||
nodeIntegration: isNodeEnv,
|
nodeIntegration: isNodeEnv,
|
||||||
preload: preloadMainScript,
|
preload: preloadMainScript,
|
||||||
nativeWindowOpen: true
|
nativeWindowOpen: true
|
||||||
|
Loading…
Reference in New Issue
Block a user