diff --git a/docs/tutorial/first-app.md b/docs/tutorial/first-app.md index 9dd795b308412..ab05c3cc79bf0 100644 --- a/docs/tutorial/first-app.md +++ b/docs/tutorial/first-app.md @@ -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')