fix: disallow loading extensions in temp sessions (#22090)
* fix: disallow loading extensions in temp sessions * docs
This commit is contained in:
parent
c2cd588e70
commit
af631f8204
4 changed files with 25 additions and 8 deletions
|
@ -28,6 +28,9 @@ session.loadExtension('path/to/unpacked/extension').then(({ id }) => {
|
|||
Loaded extensions will not be automatically remembered across exits; if you do
|
||||
not call `loadExtension` when the app runs, the extension will not be loaded.
|
||||
|
||||
Note that loading extensions is only supported in persistent sessions.
|
||||
Attempting to load an extension into an in-memory session will throw an error.
|
||||
|
||||
See the [`session`](session.md) documentation for more information about
|
||||
loading, unloading, and querying active extensions.
|
||||
|
||||
|
|
|
@ -507,6 +507,8 @@ requests an API that Electron does not support) then they will be logged to the
|
|||
console.
|
||||
|
||||
Note that Electron does not support the full range of Chrome extensions APIs.
|
||||
See [Supported Extensions APIs](extensions.md#supported-extensions-apis) for
|
||||
more details on what is supported.
|
||||
|
||||
Note that in previous versions of Electron, extensions that were loaded would
|
||||
be remembered for future runs of the application. This is no longer the case:
|
||||
|
@ -529,6 +531,9 @@ This API does not support loading packed (.crx) extensions.
|
|||
**Note:** This API cannot be called before the `ready` event of the `app` module
|
||||
is emitted.
|
||||
|
||||
**Note:** Loading extensions into in-memory (non-persistent) sessions is not
|
||||
supported and will throw an error.
|
||||
|
||||
#### `ses.removeExtension(extensionId)`
|
||||
|
||||
* `extensionId` String - ID of extension to remove
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue