chore: 对于打开 devTools 以解除注释替代新增一行

This commit is contained in:
SaberA1ter 2022-07-27 00:36:17 +08:00 committed by GitHub
parent aec9a41f66
commit 0d1fe635d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -52,12 +52,10 @@ async function createWindow() {
win.loadFile(indexHtml)
} else {
win.loadURL(url)
// win.webContents.openDevTools()
// Open devTool if the app is not packaged
win.webContents.openDevTools()
}
// Open devTool if the app is not packaged
!isPackaged && win.webContents.openDevTools()
// Test actively push message to the Electron-Renderer
win.webContents.on('did-finish-load', () => {
win?.webContents.send('main-process-message', new Date().toLocaleString())