mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
sec: deprecate some webPreference defaults to be secure-by-default (#14284)
* feat: deprecate default value of nodeIntegration * Use DeprecationStatus::Stable as the default instead of shadowing * change wording of deprecations * chore: also deprecate kWebviewTag and kContextIsolation * chore: do as we preach, lets be secure-by-default in the default app
This commit is contained in:
committed by
Charles Kerr
parent
9b2c14a745
commit
66d6ba8689
@@ -34,6 +34,18 @@ app.releaseSingleInstance()
|
||||
app.releaseSingleInstanceLock()
|
||||
```
|
||||
|
||||
## `new BrowserWindow({ webPreferences: { ... }})`
|
||||
|
||||
```js
|
||||
// Deprecated defaults
|
||||
const webPreferences = {}
|
||||
new BrowserWindow({ webPreferences })
|
||||
|
||||
// webPreferences.contextIsolation - Default was false, will be true
|
||||
// webPreferences.nodeIntegration - Default was true, will be false
|
||||
// webPreferences.webviewTag - Default was true, will be false
|
||||
```
|
||||
|
||||
|
||||
# Breaking API Changes (3.0)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user