mirror of https://github.com/nodejs/node.git
Return the EventEmitter from addListener for chaining.
http://groups.google.com/group/nodejs/browse_thread/thread/13708eacedb40b36v0.7.4-release
parent
53b3d6be35
commit
b590a45849
|
@ -8,6 +8,7 @@ node.EventEmitter.prototype.addListener = function (type, listener) {
|
||||||
if (!this._events.hasOwnProperty(type)) this._events[type] = [];
|
if (!this._events.hasOwnProperty(type)) this._events[type] = [];
|
||||||
this._events[type].push(listener);
|
this._events[type].push(listener);
|
||||||
}
|
}
|
||||||
|
return this;
|
||||||
};
|
};
|
||||||
|
|
||||||
node.EventEmitter.prototype.listeners = function (type) {
|
node.EventEmitter.prototype.listeners = function (type) {
|
||||||
|
|
Loading…
Reference in New Issue