Move global preload implementation to be session based
This commit is contained in:
parent
448ccc261d
commit
3b80ee0655
9 changed files with 58 additions and 61 deletions
|
@ -662,25 +662,6 @@ console.log(installed)
|
|||
**Note:** This API cannot be called before the `ready` event of the `app` module
|
||||
is emitted.
|
||||
|
||||
#### `BrowserWindow.addGlobalPreload(preloadPath)`
|
||||
|
||||
* `preloadPath` String - An absolute path to the preload script
|
||||
|
||||
Adds a script that will be executed on ALL new BrowserWindows just before normal `preload` scripts run.
|
||||
|
||||
#### `BrowserWindow.removeGlobalPreload(preloadPath)`
|
||||
|
||||
* `preloadPath` String - An absolute path to the preload script
|
||||
|
||||
Removes the given script from the list of global preload scripts
|
||||
|
||||
#### `BrowserWindow.getGlobalPreloads()`
|
||||
|
||||
Returns `String[]` an array of paths to preload scripts that have been registered
|
||||
|
||||
Adds a script that will be executed on ALL new BrowserWindows just before normal `preload` scripts run.
|
||||
|
||||
|
||||
### Instance Properties
|
||||
|
||||
Objects created with `new BrowserWindow` have the following properties:
|
||||
|
|
|
@ -384,6 +384,23 @@ the initial state will be `interrupted`. The download will start only when the
|
|||
|
||||
Clears the session’s HTTP authentication cache.
|
||||
|
||||
#### `ses.addPreload(preloadPath)`
|
||||
|
||||
* `preloadPath` String - An absolute path to the preload script
|
||||
|
||||
Adds a script that will be executed on ALL web contents that are associated with
|
||||
this session just before normal `preload` scripts run.
|
||||
|
||||
#### `ses.removePreload(preloadPath)`
|
||||
|
||||
* `preloadPath` String - An absolute path to the preload script
|
||||
|
||||
Removes the given script from the list of preload scripts
|
||||
|
||||
#### `ses.getPreloads()`
|
||||
|
||||
Returns `String[]` an array of paths to preload scripts that have been registered
|
||||
|
||||
### Instance Properties
|
||||
|
||||
The following properties are available on instances of `Session`:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue