mirror of https://github.com/keeweb/keeweb
calling openDevTools from window.webContents
parent
c73f81a80a
commit
099f1ca9d0
|
@ -38,7 +38,7 @@ const Launcher = {
|
|||
openDevTools() {
|
||||
this.electron()
|
||||
.remote.getCurrentWindow()
|
||||
.openDevTools({ mode: 'bottom' });
|
||||
.webContents.openDevTools({ mode: 'bottom' });
|
||||
},
|
||||
getSaveFileName(defaultPath, callback) {
|
||||
if (defaultPath) {
|
||||
|
|
|
@ -207,9 +207,6 @@ function createMainWindow() {
|
|||
perfTimestamps?.push({ name: 'setting menu', ts: process.hrtime() });
|
||||
|
||||
mainWindow.loadURL(htmlPath);
|
||||
if (showDevToolsOnStart) {
|
||||
mainWindow.openDevTools({ mode: 'bottom' });
|
||||
}
|
||||
mainWindow.once('ready-to-show', () => {
|
||||
perfTimestamps?.push({ name: 'main window ready', ts: process.hrtime() });
|
||||
if (startMinimized) {
|
||||
|
@ -221,6 +218,10 @@ function createMainWindow() {
|
|||
notifyOpenFile();
|
||||
perfTimestamps?.push({ name: 'main window shown', ts: process.hrtime() });
|
||||
reportStartProfile();
|
||||
|
||||
if (showDevToolsOnStart) {
|
||||
mainWindow.webContents.openDevTools({ mode: 'bottom' });
|
||||
}
|
||||
});
|
||||
mainWindow.webContents.on('context-menu', onContextMenu);
|
||||
mainWindow.on('resize', delaySaveMainWindowPosition);
|
||||
|
|
Loading…
Reference in New Issue