Show developer toolbar in menu

This commit is contained in:
Thomas Nordquist
2019-01-18 11:18:48 +01:00
parent 14401fbc7b
commit f462e7a881
2 changed files with 7 additions and 1 deletions

View File

@@ -1,4 +1,4 @@
import { Menu, app } from 'electron'
import { Menu, app, BrowserWindow, webContents } from 'electron'
const applicationMenu = {
label: 'Application',
@@ -10,6 +10,11 @@ const applicationMenu = {
{
type: 'separator' as 'separator',
},
{
label: 'Dev Tools',
accelerator: 'CmdOrCtrl+Alt+I',
role: 'toggleDevTools',
},
{
label: 'Quit',
accelerator: 'Command+Q',

View File

@@ -27,6 +27,7 @@ function createWindow() {
height: 700,
webPreferences: {
nodeIntegration: true,
devTools: true,
},
icon: iconPath,
})