Browse Source

Clean up little errors in events.js

v0.7.4-release
Ryan 16 years ago
parent
commit
dd1750f573
  1. 4
      src/events.js

4
src/events.js

@ -11,7 +11,7 @@ emitter.addListener = function (type, listener) {
}
};
emitter.listeners = function (type, listener) {
emitter.listeners = function (type) {
if (!this._events) this._events = {};
if (!this._events.hasOwnProperty(type)) this._events[type] = [];
return this._events[type];
@ -26,7 +26,7 @@ emitter.emit = function (type, args) {
var listeners = this._events[type];
var length = listeners.length;
for (var i = 0; i < length; i++) {
for (var i = 0; i < listeners.length; i++) {
listeners[i].apply(this, args);
}
};

Loading…
Cancel
Save