Fix JavaScript in docs
This commit is contained in:
parent
afdf52b053
commit
2c21d3b3fa
1 changed files with 2 additions and 2 deletions
|
@ -51,7 +51,7 @@ The creation of the `BrowserWindow` is customizable in `WebContents`'s `new-wind
|
|||
|
||||
```javascript
|
||||
mainWindow.webContents.on('new-window', (event, url, frameName, disposition, options, additionalFeatures) => {
|
||||
if (url.endsWith("modal.html")) {
|
||||
if (url.endsWith('modal.html')) {
|
||||
// open window as modal
|
||||
event.preventDefault()
|
||||
Object.assign(options, {
|
||||
|
@ -61,7 +61,7 @@ mainWindow.webContents.on('new-window', (event, url, frameName, disposition, opt
|
|||
height: 100
|
||||
})
|
||||
modal = new BrowserWindow(options)
|
||||
modal.loadURL(url)
|
||||
event.newGuest = modal
|
||||
}
|
||||
})
|
||||
```
|
||||
|
|
Loading…
Reference in a new issue