docs: setWindowOpenHandler
should show object return (#28015)
* Should use object return * Fix lint Co-authored-by: Cheng Zhao <github@zcbenz.com>
This commit is contained in:
parent
f4e1a343b9
commit
46cfb347d7
1 changed files with 2 additions and 2 deletions
|
@ -83,9 +83,9 @@ const mainWindow = new BrowserWindow()
|
|||
|
||||
mainWindow.webContents.setWindowOpenHandler(({ url }) => {
|
||||
if (url.startsWith('https://github.com/')) {
|
||||
return true
|
||||
return { action: 'allow' }
|
||||
}
|
||||
return false
|
||||
return { action: 'deny' }
|
||||
})
|
||||
|
||||
mainWindow.webContents.on('did-create-window', (childWindow) => {
|
||||
|
|
Loading…
Reference in a new issue