Skip to content

Commit

Permalink
fix setWindowOpenHandler call syntax (electron#29551)
Browse files Browse the repository at this point in the history
  • Loading branch information
kdau authored and BlackHole1 committed Aug 27, 2021
1 parent d75e8bb commit 72eeb3b
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions docs/api/window-open.md
Original file line number Diff line number Diff line change
Expand Up @@ -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' }
})
```

Expand Down

0 comments on commit 72eeb3b

Please sign in to comment.