mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
Fix wrong code example for preload property (#30872)
The text mentions that `preload` should be a property of `webPreferences`, but the code example shows something else. Co-authored-by: Christian Engel <chrispy@parastudios.de>
This commit is contained in:
@@ -148,7 +148,9 @@ A preload script can be attached to the main process in the `BrowserWindow` cons
|
||||
const { BrowserWindow } = require('electron')
|
||||
//...
|
||||
const win = new BrowserWindow({
|
||||
preload: 'path/to/preload.js'
|
||||
webPreferences: {
|
||||
preload: 'path/to/preload.js'
|
||||
}
|
||||
})
|
||||
//...
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user