docs: Update online-offline-events.md to reflect nodeIntegration required ()

* 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 <zcbenz@github.com>
This commit is contained in:
daveilers 2020-01-12 21:56:39 -08:00 committed by Cheng Zhao
parent 2e7f9bffeb
commit 2f394d46c7

View file

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