Permalink
Browse files

Support Firefox < 6

  • Loading branch information...
1 parent 3352d65 commit 8db41b2fba38ecd3f7b9db0a38f60aa5cac58e5e @Raynos Raynos committed Dec 3, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 index.js
View
@@ -10,17 +10,17 @@ function Ever (elem) {
Ever.prototype = new EventEmitter;
-Ever.prototype.on = function (name, cb) {
+Ever.prototype.on = function (name, cb, useCapture) {
if (!this._events) this._events = {};
if (!this._events[name]) this._events[name] = [];
this._events[name].push(cb);
- this.element.addEventListener(name, cb);
+ this.element.addEventListener(name, cb, useCapture || false);
};
Ever.prototype.addListener = Ever.prototype.on;
Ever.prototype.removeListener = function (type, listener, useCapture) {
if (!this._events) this._events = {};
- this.element.removeEventListener(type, listener, useCapture);
+ this.element.removeEventListener(type, listener, useCapture || false);
var xs = this.listeners(type);
var ix = xs.indexOf(listener);

0 comments on commit 8db41b2

Please sign in to comment.