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:
trop[bot]
2021-09-08 15:20:59 +09:00
committed by GitHub
parent 6655694cc7
commit a2929226d2

View File

@@ -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'
}
})
//...
```