Handle the Page.reload command coming from devtools
This commit is contained in:
parent
c9a3fc4317
commit
2fbe06a2a5
4 changed files with 14 additions and 1 deletions
|
@ -155,6 +155,11 @@ let wrapWebContents = function (webContents) {
|
|||
})
|
||||
})
|
||||
|
||||
// The devtools requests the webContents to reload.
|
||||
webContents.on('devtools-reload-page', function () {
|
||||
webContents.reload()
|
||||
})
|
||||
|
||||
// Delays the page-title-updated event to next tick.
|
||||
webContents.on('-page-title-updated', function (...args) {
|
||||
setImmediate(() => {
|
||||
|
@ -168,6 +173,7 @@ let wrapWebContents = function (webContents) {
|
|||
deprecate.event(webContents, 'page-title-set', 'page-title-updated', function (...args) {
|
||||
return this.emit.apply(this, ['page-title-set'].concat(args))
|
||||
})
|
||||
|
||||
webContents.printToPDF = function (options, callback) {
|
||||
var printingSetting
|
||||
printingSetting = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue