Mark mixed sandbox as macOS/Windows only
This commit is contained in:
parent
04c87cd1c3
commit
e37fc0e30a
3 changed files with 8 additions and 4 deletions
|
@ -684,8 +684,8 @@ allowing multiple instances of your app to run, this will ensure that only a
|
|||
single instance of your app is running, and other instances signal this
|
||||
instance and exit.
|
||||
|
||||
`callback` will be called by the first instance with `callback(argv, workingDirectory)`
|
||||
when a second instance has been executed. `argv` is an Array of the second instance's
|
||||
`callback` will be called by the first instance with `callback(argv, workingDirectory)`
|
||||
when a second instance has been executed. `argv` is an Array of the second instance's
|
||||
command line arguments, and `workingDirectory` is its current working directory. Usually
|
||||
applications respond to this by making their primary window focused and
|
||||
non-minimized.
|
||||
|
@ -913,7 +913,7 @@ correctly.
|
|||
|
||||
**Note:** This will not affect `process.argv`.
|
||||
|
||||
### `app.enableMixedSandbox()` _Experimental_
|
||||
### `app.enableMixedSandbox()` _Experimental_ _macOS_ _Windows_
|
||||
|
||||
Enables mixed sandbox mode on the app.
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ app.on('ready', () => {
|
|||
```
|
||||
|
||||
In the above code the `BrowserWindow` that was created has node.js disabled and can communicate
|
||||
only via IPC. The use of this option stops electron from creating a node.js runtime in the renderer. Also,
|
||||
only via IPC. The use of this option stops electron from creating a node.js runtime in the renderer. Also,
|
||||
within this new window `window.open` follows the native behaviour (by default electron creates a `BrowserWindow`
|
||||
and returns a proxy to this via `window.open`).
|
||||
|
||||
|
@ -62,6 +62,7 @@ force `sandbox: true` for all `BrowserWindow` instances.
|
|||
|
||||
To enable OS-enforced sandbox on `BrowserWindow` or `webview` process with `sandbox:true` without causing
|
||||
entire app to be in sandbox, `--enable-mixed-sandbox` command-line argument must be passed to electron.
|
||||
This option is currently only supported on macOS and Windows.
|
||||
|
||||
```js
|
||||
let win
|
||||
|
|
|
@ -568,6 +568,9 @@ describe('app module', function () {
|
|||
})
|
||||
|
||||
describe('mixed sandbox option', function () {
|
||||
// FIXME Get these specs running on Linux
|
||||
if (process.platform === 'linux') return
|
||||
|
||||
let appProcess = null
|
||||
let server = null
|
||||
const socketPath = process.platform === 'win32' ? '\\\\.\\pipe\\electron-mixed-sandbox' : '/tmp/electron-mixed-sandbox'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue