|
@@ -681,12 +681,12 @@ windows, limiting it to only what you need.
|
|
|
const { shell } = require('electron')
|
|
|
|
|
|
app.on('web-contents-created', (event, contents) => {
|
|
|
- contents.on('new-window', (event, navigationUrl) => {
|
|
|
+ contents.on('new-window', async (event, navigationUrl) => {
|
|
|
// In this example, we'll ask the operating system
|
|
|
// to open this event's url in the default browser.
|
|
|
event.preventDefault()
|
|
|
|
|
|
- shell.openExternalSync(navigationUrl)
|
|
|
+ await shell.openExternal(navigationUrl)
|
|
|
})
|
|
|
})
|
|
|
```
|