fix: setWindowOpenHandler call syntax (#29727)

Co-authored-by: kdau <kevin@kdau.com>
This commit is contained in:
trop[bot]
2021-06-16 10:12:51 -07:00
committed by GitHub
parent 5e3bdfd920
commit 1789cfa5d3

View File

@@ -85,15 +85,18 @@ const mainWindow = new BrowserWindow()
mainWindow.webContents.setWindowOpenHandler(({ url }) => {
if (url === 'about:blank') {
return {
frame: false,
fullscreenable: false,
backgroundColor: 'black',
webPreferences: {
preload: 'my-child-window-preload-script.js'
action: 'allow',
overrideBrowserWindowOptions: {
frame: false,
fullscreenable: false,
backgroundColor: 'black',
webPreferences: {
preload: 'my-child-window-preload-script.js'
}
}
}
}
return false
return { action: 'deny' }
})
```