diff options
Diffstat (limited to 'electron_js')
| -rw-r--r-- | electron_js/main.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/electron_js/main.js b/electron_js/main.js index ba107fee..4b2a2c1e 100644 --- a/electron_js/main.js +++ b/electron_js/main.js @@ -141,6 +141,11 @@ function createWindow() { win.webContents.session.setProxy({proxyRules:argv.proxy}, function() {}); } + if (argv.debug) { + // Open the DevTools. + win.webContents.openDevTools(); + } + //win.webContents.openDevTools(); // and load the index.html of the app. const startUrl = process.env.ELECTRON_START_URL || url.format({ @@ -246,8 +251,7 @@ if (process.platform === 'darwin') { const menu = Menu.buildFromTemplate(template); Menu.setApplicationMenu(menu); -// Open the DevTools. -//win.webContents.openDevTools(); + // Emitted when the window is closed. win.on('closed', () => { // Dereference the window object, usually you would store windows |
