Skip to content
This repository has been archived by the owner on Jan 25, 2022. It is now read-only.

Commit

Permalink
forgot to turn on node integration in renderer process
Browse files Browse the repository at this point in the history
  • Loading branch information
jjhbw committed Oct 7, 2020
1 parent 1a71e3d commit dc3d259
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions electron.js
Expand Up @@ -9,6 +9,10 @@ const isDev = isEnvSet ? parseInt(process.env.ELECTRON_IS_DEV, 10) === 1 : !app.

function createWindow() {
mainWindow = new electron.BrowserWindow({
webPreferences: {
// Allow access to NodeJS APIs from this window.
nodeIntegration: true
},
// Hide the window until maximize() is called
width: 1600,
height: 900,
Expand Down

0 comments on commit dc3d259

Please sign in to comment.