Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'master' of git://github.com/chrisdickinson/ever into ch…

…risdickinson-master
  • Loading branch information...
commit 8f5ec24fa9b43c755a0eeae3c936efee37ba62cc 2 parents 578a36c + 3d85bd7
@substack authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 index.js
View
6 index.js
@@ -15,6 +15,8 @@ Ever.prototype.on = function (name, cb, useCapture) {
if (!this._events[name]) this._events[name] = [];
this._events[name].push(cb);
this.element.addEventListener(name, cb, useCapture || false);
+
+ return this;
};
Ever.prototype.addListener = Ever.prototype.on;
@@ -25,6 +27,8 @@ Ever.prototype.removeListener = function (type, listener, useCapture) {
var xs = this.listeners(type);
var ix = xs.indexOf(listener);
if (ix >= 0) xs.splice(ix, 1);
+
+ return this;
};
Ever.prototype.removeAllListeners = function (type) {
@@ -44,7 +48,7 @@ Ever.prototype.removeAllListeners = function (type) {
if (key) removeAll(key);
}
}
- EventEmitter.prototype.removeAllListeners.apply(self, arguments);
+ return EventEmitter.prototype.removeAllListeners.apply(self, arguments);
}
var initSignatures = require('./init.json');
Please sign in to comment.
Something went wrong with that request. Please try again.