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,6 +85,8 @@ const mainWindow = new BrowserWindow()
mainWindow.webContents.setWindowOpenHandler(({ url }) => {
if (url === 'about:blank') {
return {
action: 'allow',
overrideBrowserWindowOptions: {
frame: false,
fullscreenable: false,
backgroundColor: 'black',
@ -93,7 +95,8 @@ mainWindow.webContents.setWindowOpenHandler(({ url }) => {
}
}
}
return false
}
return { action: 'deny' }
})
```