mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
fix: 'page-title-updated' event forwarding + documentation (#18270)
This commit is contained in:
committed by
Alexey Kuzmin
parent
2a08bfbcc6
commit
76783e2a90
@@ -39,9 +39,9 @@ BrowserWindow.prototype._init = function () {
|
||||
})
|
||||
|
||||
// Change window title to page title.
|
||||
this.webContents.on('page-title-updated', (event, title) => {
|
||||
this.webContents.on('page-title-updated', (event, title, ...args) => {
|
||||
// Route the event to BrowserWindow.
|
||||
this.emit('page-title-updated', event, title)
|
||||
this.emit('page-title-updated', event, title, ...args)
|
||||
if (!this.isDestroyed() && !event.defaultPrevented) this.setTitle(title)
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user