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
|
@ -10,7 +10,9 @@ const electron = require('electron')
|
|||
const {deprecate, Menu} = electron
|
||||
const {EventEmitter} = require('events')
|
||||
|
||||
// App is an EventEmitter.
|
||||
Object.setPrototypeOf(App.prototype, EventEmitter.prototype)
|
||||
EventEmitter.call(app)
|
||||
|
||||
Object.assign(app, {
|
||||
setApplicationMenu (menu) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue