fix: disable nodeIntegrationInWorker for certain Worker types (#35919)

fix: disable nodeIntegrationInWorker for certain Worker types
This commit is contained in:
Shelley Vohr
2022-10-12 07:36:24 -07:00
committed by GitHub
parent 1328d8d670
commit 7ce94eb0b4
6 changed files with 51 additions and 34 deletions

View File

@@ -20,6 +20,8 @@ const win = new BrowserWindow({
The `nodeIntegrationInWorker` can be used independent of `nodeIntegration`, but
`sandbox` must not be set to `true`.
**Note:** This option is not available in [`SharedWorker`s](https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker) or [`Service Worker`s](https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker) owing to incompatibilities in sandboxing policies.
## Available APIs
All built-in modules of Node.js are supported in Web Workers, and `asar`