feat: add app render-process-gone event (#23560)

This commit is contained in:
Milan Burda 2020-05-17 17:05:05 +02:00 committed by GitHub
parent 9d7ba98209
commit 52b50e6b33
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 47 additions and 0 deletions

View file

@ -501,6 +501,10 @@ WebContents.prototype._init = function () {
app.emit('renderer-process-crashed', event, this, ...args);
});
this.on('render-process-gone', (event, ...args) => {
app.emit('render-process-gone', event, this, ...args);
});
// The devtools requests the webContents to reload.
this.on('devtools-reload-page', function () {
this.reload();