add a menu to open dev tools for current webview

This commit is contained in:
Romain Maneschi
2019-02-07 00:20:26 +01:00
parent a1b0a28261
commit 1ef2108756
2 changed files with 10 additions and 1 deletions

View File

@@ -145,7 +145,7 @@ function createTemplate(mainWindow, config, isDev) {
visible: false,
role: 'zoomout',
}, separatorItem, {
label: 'Toggle Developer Tools',
label: 'Developer Tools for Application Wrapper',
accelerator: (() => {
if (process.platform === 'darwin') {
return 'Alt+Command+I';
@@ -157,6 +157,11 @@ function createTemplate(mainWindow, config, isDev) {
focusedWindow.toggleDevTools();
}
},
}, {
label: 'Developer Tools for Current Server',
click() {
mainWindow.webContents.send('open-devtool');
},
}],
});
template.push({