No more need to delay did-fail-load event
This commit is contained in:
parent
49d25693ee
commit
92882c358a
2 changed files with 6 additions and 22 deletions
|
@ -146,15 +146,6 @@ let wrapWebContents = function (webContents) {
|
|||
return menu.popup(params.x, params.y)
|
||||
})
|
||||
|
||||
// This error occurs when host could not be found.
|
||||
webContents.on('did-fail-provisional-load', function (...args) {
|
||||
// Calling loadURL during this event might cause crash, so delay the event
|
||||
// until next tick.
|
||||
setImmediate(() => {
|
||||
this.emit.apply(this, ['did-fail-load'].concat(args))
|
||||
})
|
||||
})
|
||||
|
||||
// The devtools requests the webContents to reload.
|
||||
webContents.on('devtools-reload-page', function () {
|
||||
webContents.reload()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue