Skip to content
This repository has been archived by the owner on Mar 13, 2018. It is now read-only.

Commit

Permalink
Forward capture boolean to addEventListener
Browse files Browse the repository at this point in the history
Fixes #32
  • Loading branch information
dfreedm committed Aug 5, 2014
1 parent c9a0710 commit 66383d5
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/dispatcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -363,11 +363,12 @@
* @param {Element} node
* @param {string} gesture
* @param {Function} handler
* @param {Boolean} capture
*/
scope.addEventListener = function(node, gesture, handler) {
scope.addEventListener = function(node, gesture, handler, capture) {
if (handler) {
scope.activateGesture(node, gesture);
node.addEventListener(gesture, handler);
node.addEventListener(gesture, handler, capture);
}
};

Expand Down Expand Up @@ -408,11 +409,12 @@
* @param {Element} node
* @param {string} gesture
* @param {Function} handler
* @param {Boolean} capture
*/
scope.removeEventListener = function(node, gesture, handler) {
scope.removeEventListener = function(node, gesture, handler, capture) {
if (handler) {
scope.deactivateGesture(node, gesture);
node.removeEventListener(gesture, handler);
node.removeEventListener(gesture, handler, capture);
}
};
})(window.PolymerGestures);

0 comments on commit 66383d5

Please sign in to comment.