Skip to content

Commit

Permalink
fix: set nodeIntegration as true explicitly for renderer window
Browse files Browse the repository at this point in the history
  • Loading branch information
hackjutsu committed Mar 2, 2019
1 parent 2e36629 commit d524c95
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ function createWindow (autoLogin) {
defaultHeight: 800
})

const webPreferences = {
nodeIntegration: true
}

mainWindow = new BrowserWindow({
width: mainWindowState.width,
height: mainWindowState.height,
Expand All @@ -69,7 +73,8 @@ function createWindow (autoLogin) {
// titleBarStyle: 'hidden',
backgroundColor: '#808080',
show: false,
icon: path.join(__dirname, '/icon/icon.png')
icon: path.join(__dirname, '/icon/icon.png'),
webPreferences
})

if (autoLogin) {
Expand Down

0 comments on commit d524c95

Please sign in to comment.