Permalink
Browse files

Merge pull request #5 from necolas/fix-default-capture

Set default `capture` to `false`
  • Loading branch information...
TooTallNate committed Mar 4, 2013
2 parents 9bd0291 + 1aa726d commit 5a3bff3be407cb503af1358745b43c4d092ecae0
Showing with 2 additions and 2 deletions.
  1. +2 −2 index.js
View
@@ -12,7 +12,7 @@
exports.bind = function(el, type, fn, capture){
if (el.addEventListener) {
- el.addEventListener(type, fn, capture);
+ el.addEventListener(type, fn, capture || false);
} else {
el.attachEvent('on' + type, fn);
}
@@ -32,7 +32,7 @@ exports.bind = function(el, type, fn, capture){
exports.unbind = function(el, type, fn, capture){
if (el.removeEventListener) {
- el.removeEventListener(type, fn, capture);
+ el.removeEventListener(type, fn, capture || false);
} else {
el.detachEvent('on' + type, fn);
}

0 comments on commit 5a3bff3

Please sign in to comment.