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
|
single instance of your app is running, and other instances signal this
|
||||||
instance and exit.
|
instance and exit.
|
||||||
|
|
||||||
`callback` will be called by the first instance with `callback(argv, workingDirectory)`
|
`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
|
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
|
command line arguments, and `workingDirectory` is its current working directory. Usually
|
||||||
applications respond to this by making their primary window focused and
|
applications respond to this by making their primary window focused and
|
||||||
non-minimized.
|
non-minimized.
|
||||||
|
@ -913,7 +913,7 @@ correctly.
|
||||||
|
|
||||||
**Note:** This will not affect `process.argv`.
|
**Note:** This will not affect `process.argv`.
|
||||||
|
|
||||||
### `app.enableMixedSandbox()` _Experimental_
|
### `app.enableMixedSandbox()` _Experimental_ _macOS_ _Windows_
|
||||||
|
|
||||||
Enables mixed sandbox mode on the app.
|
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
|
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`
|
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`).
|
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
|
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.
|
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
|
```js
|
||||||
let win
|
let win
|
||||||
|
|
|
@ -568,6 +568,9 @@ describe('app module', function () {
|
||||||
})
|
})
|
||||||
|
|
||||||
describe('mixed sandbox option', function () {
|
describe('mixed sandbox option', function () {
|
||||||
|
// FIXME Get these specs running on Linux
|
||||||
|
if (process.platform === 'linux') return
|
||||||
|
|
||||||
let appProcess = null
|
let appProcess = null
|
||||||
let server = null
|
let server = null
|
||||||
const socketPath = process.platform === 'win32' ? '\\\\.\\pipe\\electron-mixed-sandbox' : '/tmp/electron-mixed-sandbox'
|
const socketPath = process.platform === 'win32' ? '\\\\.\\pipe\\electron-mixed-sandbox' : '/tmp/electron-mixed-sandbox'
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue