fix setWindowOpenHandler call syntax (#29551)
This commit is contained in:
parent
2ae7e04598
commit
226f2a9a56
1 changed files with 9 additions and 6 deletions
|
@ -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' }
|
||||
})
|
||||
```
|
||||
|
||||
|
|
Loading…
Reference in a new issue