From 2f394d46c71afe04e24bfbf034b66a5bf081923c Mon Sep 17 00:00:00 2001 From: daveilers Date: Sun, 12 Jan 2020 21:56:39 -0800 Subject: [PATCH] docs: Update online-offline-events.md to reflect nodeIntegration required (#21707) * Update online-offline-events.md NodeIntegration is required for online/offline and the default changed, so the example should reflect the need for that config * chore: fix lint warning Co-authored-by: Cheng Zhao --- docs/tutorial/online-offline-events.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/tutorial/online-offline-events.md b/docs/tutorial/online-offline-events.md index 82d679183b..ae5d5d07ac 100644 --- a/docs/tutorial/online-offline-events.md +++ b/docs/tutorial/online-offline-events.md @@ -54,7 +54,7 @@ const { app, BrowserWindow, ipcMain } = require('electron') let onlineStatusWindow app.on('ready', () => { - onlineStatusWindow = new BrowserWindow({ width: 0, height: 0, show: false }) + onlineStatusWindow = new BrowserWindow({ width: 0, height: 0, show: false, webPreferences: { nodeIntegration: true } }) onlineStatusWindow.loadURL(`file://${__dirname}/online-status.html`) })