atom/atom — pull request #3984 by nathansobo (2014-10-28 22:48:35+00:00)
Title: Expand command registry to handle native events

As we explored the overall API for creating views in packages (#3752), we realized that it's awkward to have two different mechanisms for subscribing to command events and native events in packages. It would be nice to use the same pattern to subscribe to things like `core:cancel` and `click`. Currently click handlers need to be registered with `addEventListener`.

We've decided to expand the role of the command registry, renaming it to the event registry and using it to register event handlers for both native and custom events. This will ensure a consistent event subscription experience for package authors:

## Tasks

* [ ] Expand jQuery on/trigger retrofit to cover all event types
* [ ] Ensure vim mode specs still pass
* [ ] Allow event capture in addition to bubbling
* [ ] Retrofit addEventListener to add events to event registry
* [ ] Rename to `EventRegistry`
* [ ] Assign to `atom.events` and deprecate `atom.commands`