Add ability to set global preload scripts
This commit is contained in:
parent
d598aa1a67
commit
0ddd078aaf
10 changed files with 116 additions and 13 deletions
|
@ -662,6 +662,25 @@ 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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue