Simpler way of inheriting EventEmitter.

This commit is contained in:
Cheng Zhao 2013-04-22 16:11:56 +08:00
parent 3ae0c99ca9
commit db0717851d

View file

@ -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) ->