singletons that are retroactively turned into EventEmitters should call the EventEmitter ctor

This commit is contained in:
Charles Kerr 2017-11-01 23:05:27 -05:00
parent 577012370e
commit 1c09dede1a
7 changed files with 14 additions and 0 deletions

View file

@ -1,6 +1,8 @@
const {EventEmitter} = require('events')
const {screen, Screen} = process.atomBinding('screen')
// Screen is an EventEmitter.
Object.setPrototypeOf(Screen.prototype, EventEmitter.prototype)
EventEmitter.call(screen)
module.exports = screen