There was an error while loading. Please reload this page.
on
1 parent 01124f2 commit 7e5fc72Copy full SHA for 7e5fc72
3 files changed
d3.js
@@ -1513,7 +1513,8 @@ function d3_selection(groups) {
1513
1514
// type can be namespaced, e.g., "click.foo"
1515
// listener can be null for removal
1516
- groups.on = function(type, listener) {
+ groups.on = function(type, listener, capture) {
1517
+ if (arguments.length < 3) capture = false;
1518
1519
// parse the type specifier
1520
var i = type.indexOf("."),
@@ -1522,8 +1523,8 @@ function d3_selection(groups) {
1522
1523
1524
// remove the old event listener, and add the new event listener
1525
return groups.each(function(d, i) {
- if (this[name]) this.removeEventListener(typo, this[name], false);
1526
- if (listener) this.addEventListener(typo, this[name] = l, false);
+ if (this[name]) this.removeEventListener(typo, this[name], capture);
1527
+ if (listener) this.addEventListener(typo, this[name] = l, capture);
1528
1529
// wrapped event listener that preserves d, i
1530
function l(e) {
0 commit comments