docs: update nodeIntegration section for new defaults (#17715)
This commit is contained in:
parent
77a4946069
commit
2fd3029040
2 changed files with 26 additions and 8 deletions
|
@ -109,7 +109,13 @@ const { app, BrowserWindow } = require('electron')
|
|||
|
||||
function createWindow () {
|
||||
// Create the browser window.
|
||||
let win = new BrowserWindow({ width: 800, height: 600 })
|
||||
let win = new BrowserWindow({
|
||||
width: 800,
|
||||
height: 600,
|
||||
webPreferences: {
|
||||
nodeIntegration: true
|
||||
}
|
||||
})
|
||||
|
||||
// and load the index.html of the app.
|
||||
win.loadFile('index.html')
|
||||
|
@ -132,7 +138,13 @@ let win
|
|||
|
||||
function createWindow () {
|
||||
// Create the browser window.
|
||||
win = new BrowserWindow({ width: 800, height: 600 })
|
||||
let win = new BrowserWindow({
|
||||
width: 800,
|
||||
height: 600,
|
||||
webPreferences: {
|
||||
nodeIntegration: true
|
||||
}
|
||||
})
|
||||
|
||||
// and load the index.html of the app.
|
||||
win.loadFile('index.html')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue