Simpler way of inheriting EventEmitter.
This commit is contained in:
parent
3ae0c99ca9
commit
db0717851d
1 changed files with 1 additions and 4 deletions
|
@ -1,10 +1,7 @@
|
|||
EventEmitter = require('events').EventEmitter
|
||||
|
||||
Window = process.atom_binding('window').Window
|
||||
|
||||
# Inherits EventEmitter.
|
||||
for prop, func of EventEmitter.prototype
|
||||
Window.prototype[prop] = func
|
||||
Window.prototype.__proto__ = EventEmitter.prototype
|
||||
|
||||
# Convient accessors.
|
||||
setupGetterAndSetter = (constructor, name, getter, setter) ->
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue