Add webContents.sendToAll to send message to all frames
This commit is contained in:
parent
c1facec5a6
commit
9ab76fb884
7 changed files with 58 additions and 18 deletions
|
@ -78,6 +78,14 @@ let wrapWebContents = function (webContents) {
|
|||
return this._send(channel, args)
|
||||
}
|
||||
|
||||
// WebContents::sendToAll(channel, args..)
|
||||
webContents.sendToAll = function (channel, ...args) {
|
||||
if (channel == null) {
|
||||
throw new Error('Missing required channel argument')
|
||||
}
|
||||
return this._sendToAll(channel, args)
|
||||
}
|
||||
|
||||
// The navigation controller.
|
||||
controller = new NavigationController(webContents)
|
||||
ref1 = NavigationController.prototype
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue