Skip to content


Removing events in d3.dispatch by name only #880

tmcw opened this Issue · 2 comments

2 participants


When attaching several listeners of different types with d3's d3.dispatch, it could be handy to just supply a name to on('.foo', null).

For instance

// add bindings'#foo').on('', function() {}).on('', function() {}).on('', function() {});

// remove bindings'#foo').on('.foo', null);

Regardless of whether behavior’s get an unbind method, it seems useful to have this functionality as well. In fact, I’d prefer to support this initially, so staging for 3.1.

@jasondavies jasondavies added a commit that referenced this issue
@jasondavies jasondavies Support for {selection,dispatch}.on(".foo", null).
This allows all listeners with a particular name to be removed.

Fixes #880.

Staged in #1120.

@mbostock mbostock closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.