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
|
EventEmitter = require('events').EventEmitter
|
||||||
|
|
||||||
Window = process.atom_binding('window').Window
|
Window = process.atom_binding('window').Window
|
||||||
|
Window.prototype.__proto__ = EventEmitter.prototype
|
||||||
# Inherits EventEmitter.
|
|
||||||
for prop, func of EventEmitter.prototype
|
|
||||||
Window.prototype[prop] = func
|
|
||||||
|
|
||||||
# Convient accessors.
|
# Convient accessors.
|
||||||
setupGetterAndSetter = (constructor, name, getter, setter) ->
|
setupGetterAndSetter = (constructor, name, getter, setter) ->
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue