Merge pull request #77 from jaw52/fix/open_child_window
fix(example): fix open childWindow error
This commit is contained in:
commit
4e3a9e3a1b
|
@ -92,13 +92,15 @@ ipcMain.handle('open-win', (event, arg) => {
|
|||
const childWindow = new BrowserWindow({
|
||||
webPreferences: {
|
||||
preload,
|
||||
nodeIntegration: true,
|
||||
contextIsolation: false,
|
||||
},
|
||||
})
|
||||
|
||||
if (app.isPackaged) {
|
||||
childWindow.loadFile(indexHtml, { hash: arg })
|
||||
} else {
|
||||
childWindow.loadURL(`${url}/#${arg}`)
|
||||
childWindow.loadURL(`${url}#${arg}`)
|
||||
// childWindow.webContents.openDevTools({ mode: "undocked", activate: true })
|
||||
}
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue