Commit Graph

21 Commits

Author SHA1 Message Date
Nathan Sobo
832e7113f7 Include all inline commands on the bubble path in ::findCommands 2014-11-10 10:10:52 -07:00
Max Brunsfeld
0c40a1ef92 Include inline commands in command palette 2014-11-10 10:09:24 -07:00
Nathan Sobo
2d7aa2efda Forward .abortKeyBinding() on CommandRegistry events to original event 2014-10-08 12:13:13 -07:00
Nathan Sobo
cdb4ed1327 Integrate jQuery::on and ::trigger with command registry dispatch 2014-10-08 11:56:50 -07:00
Nathan Sobo
0d55a377fb Support inline listeners
This extends the command registry to support listeners registered on
individual elements in addition to selectors. The analogy is inline
styles vs selector-based styles. I’m hoping this will be the foundation
of integrating cleanly with legacy commands registered via our
jQuery::command extension.
2014-10-08 11:56:50 -07:00
Nathan Sobo
2084c45404 💄 spec description 2014-10-08 11:56:50 -07:00
Nathan Sobo
066f6bf03c Forward stop[Immediate]Propagation to original event in CommandRegistry
Previously, stopping propagation would work on the synthetic bubbling
phase of the command registry itself, but the original event would
continue to propagate which is counterintuitive.
2014-09-24 14:34:28 -06:00
Nathan Sobo
2df5957f9b Restore commands after each spec
This commit adds the ability to get and restore snapshots of command
listeners. Whatever commands are installed before specs begin are
preserved, but commands added during specs are always cleared away.
2014-09-24 14:34:28 -06:00
Nathan Sobo
09b5ac887a Return whether a dispatched command matched a listener 2014-09-24 14:34:28 -06:00
Nathan Sobo
0c9fd46030 Add CommandRegistry::dispatch for tests 2014-09-24 14:34:27 -06:00
Nathan Sobo
a069f34ad6 Fix CommandRegistry::findCommands spec
Don’t assert against commands registered on the window with jQuery
2014-09-16 09:23:52 -06:00
Nathan Sobo
3e0e19d51b Add CommandRegistry::findCommands 2014-09-11 13:48:35 -06:00
Nathan Sobo
155fb675ec 💄 group dispatch specs 2014-09-11 13:48:35 -06:00
Nathan Sobo
43d3082d4e Allow multiple commands to be registered by passing an object 2014-09-11 13:48:35 -06:00
Nathan Sobo
aee33fc126 Pass selector first to CommandRegistry::add 2014-09-11 13:48:35 -06:00
Nathan Sobo
4de0865d28 Allow listeners to be removed via a Disposable returned from ::add 2014-09-11 13:48:34 -06:00
Nathan Sobo
fe27ebec1b Handle .stopImmediatePropagation() being called on command events 2014-09-11 13:48:34 -06:00
Nathan Sobo
fbaf956e1f Handle .stopPropagation() being called on command events 2014-09-11 13:48:34 -06:00
Nathan Sobo
5eb22520f1 Order multiple matching listeners by selector specificity 2014-09-11 13:48:34 -06:00
Nathan Sobo
a075aa2b07 Perform synthetic bubbling through event target ancestors 2014-09-11 13:48:34 -06:00
Nathan Sobo
decc983420 Start on CommandRegistry 2014-09-11 13:48:34 -06:00