From d77815fa752c7e54043535256e9b3d094a4d7c6c Mon Sep 17 00:00:00 2001 From: Bong Nguyen Date: Fri, 7 Oct 2022 09:46:54 +1100 Subject: [PATCH] Compatible with Electron 12 --- lib/worker-manager.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/lib/worker-manager.js b/lib/worker-manager.js index 17b9588191..3ff47d3bea 100644 --- a/lib/worker-manager.js +++ b/lib/worker-manager.js @@ -267,8 +267,17 @@ export class RendererProcess { this.onStdinError = onStdinError; this.onExecStarted = onExecStarted; - this.win = new BrowserWindow({show: !!process.env.ATOM_GITHUB_SHOW_RENDERER_WINDOW, - webPreferences: {nodeIntegration: true, enableRemoteModule: true}}); + this.win = new BrowserWindow({ + show: !!process.env.ATOM_GITHUB_SHOW_RENDERER_WINDOW, + webPreferences: { + nodeIntegration: true, + enableRemoteModule: true, + + // The default of contextIsolation is changed to true so we'll have to set it to false. + // See https://github.com/electron/electron/issues/23506 for more information + contextIsolation: false + }, + }); this.webContents = this.win.webContents; // this.webContents.openDevTools();