chore: Add new webFrame IsolatedWorldInfo API and deprecate (#16801)

* chore: Add new webFrame IsolatedWorldInfo API and deprecate

* Flag deprecated methods in documentation

* address comments

* Address review comments

* remove unused variable

* Update based on review
This commit is contained in:
Nitish Sakhawalkar 2019-02-13 10:05:28 -08:00 committed by John Kleinschmidt
parent 1f458eb177
commit 3dfef4a376
4 changed files with 72 additions and 6 deletions

View file

@ -71,6 +71,23 @@ Child windows opened with the `nativeWindowOpen` option will always have Node.js
Renderer process APIs `webFrame.setRegisterURLSchemeAsPrivileged` and `webFrame.registerURLSchemeAsBypassingCSP` as well as browser process API `protocol.registerStandardSchemes` have been removed.
A new API, `protocol.registerSchemesAsPrivileged` has been added and should be used for registering custom schemes with the required privileges. Custom schemes are required to be registered before app ready.
## webFrame Isolated World APIs
```js
// Deprecated
webFrame.setIsolatedWorldContentSecurityPolicy(worldId, csp)
webFrame.setIsolatedWorldHumanReadableName(worldId, name)
webFrame.setIsolatedWorldSecurityOrigin(worldId, securityOrigin)
// Replace with
webFrame.setIsolatedWorldInfo(
worldId,
{
securityOrigin: 'some_origin',
name: 'human_readable_name',
csp: 'content_security_policy'
})
```
# Planned Breaking API Changes (4.0)
The following list includes the breaking API changes made in Electron 4.0.