docs: update nodeIntegration section for new defaults (#17715)

This commit is contained in:
Milan Burda 2019-04-29 23:29:27 +02:00 committed by Shelley Vohr
parent 77a4946069
commit 2fd3029040
2 changed files with 26 additions and 8 deletions

View file

@ -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')