From 58e504de323afa5c29a588b4f3071d158c073429 Mon Sep 17 00:00:00 2001 From: Ronan Jouchet Date: Mon, 6 Dec 2021 16:05:41 -0500 Subject: [PATCH] document contextIsolation stuff --- app/src/helpers/windowHelpers.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/app/src/helpers/windowHelpers.ts b/app/src/helpers/windowHelpers.ts index 0114a2d..b29800b 100644 --- a/app/src/helpers/windowHelpers.ts +++ b/app/src/helpers/windowHelpers.ts @@ -148,6 +148,15 @@ export function getDefaultWindowOptions( plugins: true, webSecurity: !options.insecure, zoomFactor: options.zoom, + // `contextIsolation` was switched to true in Electron 12, which: + // 1. Breaks access to global variables in `--inject`-ed scripts: + // https://github.com/nativefier/nativefier/issues/1269 + // 2. Might break notifications under Windows, although this was refuted: + // https://github.com/nativefier/nativefier/issues/1292 + // So, it was flipped to false in https://github.com/nativefier/nativefier/pull/1308 + // + // If attempting to set it back to `true` (for security), + // do test exhaustively these two areas, and more. contextIsolation: false, ...webPreferences, },