https://github.com/d3/d3-dispatch
Register named callbacks and call them with arguments.
https://github.com/d3/d3-dispatch
Last synced: 3 months ago
JSON representation
Register named callbacks and call them with arguments.
- Host: GitHub
- URL: https://github.com/d3/d3-dispatch
- Owner: d3
- License: isc
- Created: 2015-06-05T18:43:51.000Z (about 10 years ago)
- Default Branch: main
- Last Pushed: 2023-10-06T15:01:59.000Z (almost 2 years ago)
- Last Synced: 2024-10-29T20:05:33.557Z (9 months ago)
- Language: JavaScript
- Homepage: https://d3js.org/d3-dispatch
- Size: 181 KB
- Stars: 75
- Watchers: 9
- Forks: 26
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# d3-dispatch
Dispatching is a low-level interaction mechanism that allows you to register named callbacks and then call them with arbitrary arguments. A variety of D3 interaction components, such as [d3-drag](https://github.com/d3/d3-drag), use this mechanism to emit events to listeners. Think of this like Node’s [EventEmitter](https://nodejs.org/api/events.html), except every listener has a well-defined name so it’s easy to remove or replace them.
## Resources
- [Documentation](https://d3js.org/d3-dispatch)
- [Examples](https://observablehq.com/collection/@d3/d3-dispatch)
- [Releases](https://github.com/d3/d3-dispatch/releases)
- [Getting help](https://d3js.org/community)