singletons that are retroactively turned into EventEmitters should call the EventEmitter ctor
This commit is contained in:
parent
577012370e
commit
1c09dede1a
7 changed files with 14 additions and 0 deletions
|
@ -5,6 +5,7 @@ const {webFrame, WebFrame} = process.atomBinding('web_frame')
|
|||
|
||||
// WebFrame is an EventEmitter.
|
||||
Object.setPrototypeOf(WebFrame.prototype, EventEmitter.prototype)
|
||||
EventEmitter.call(webFrame)
|
||||
|
||||
// Lots of webview would subscribe to webFrame's events.
|
||||
webFrame.setMaxListeners(0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue