fix setWindowOpenHandler call syntax (#29551)

This commit is contained in:
kdau 2021-06-16 00:16:18 -07:00 committed by GitHub
parent 2ae7e04598
commit 226f2a9a56
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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' }
})
```