Skip to content

Commit e731de7

Browse files
Add note about requiring sandbox (#144)
* add note about requiring sandbox * clarify --------- Co-authored-by: Samuel Maddock <[email protected]>
1 parent 3ed5c69 commit e731de7

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

packages/electron-chrome-extensions/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,11 @@ app.whenReady().then(() => {
7777

7878
const browserWindow = new BrowserWindow({
7979
webPreferences: {
80-
// Same session given to Extensions class
80+
// Use same session given to Extensions class
8181
session: browserSession,
82-
// Recommended options for loading remote content
82+
// Required for extension preload scripts
8383
sandbox: true,
84+
// Recommended for loading remote content
8485
contextIsolation: true,
8586
},
8687
})
@@ -491,6 +492,7 @@ See [Electron's Notification tutorial](https://www.electronjs.org/docs/tutorial/
491492
- Usage of Electron's `webRequest` API will prevent `chrome.webRequest` listeners from being called.
492493
- Chrome extensions are not supported in non-persistent/incognito sessions.
493494
- `chrome.webNavigation.onDOMContentLoaded` is only emitted for the top frame until [support for iframes](https://github.com/electron/electron/issues/27344) is added.
495+
- Service worker preload scripts require Electron's sandbox to be enabled. This is the default behavior, but might be overridden by the `--no-sandbox` flag or `sandbox: false` in the `webPreferences` of a `BrowserWindow`. Check for the `--no-sandbox` flag using `ps -eaf | grep <appname>`.
494496

495497
## License
496498

0 commit comments

Comments
 (0)