mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-29 00:30:44 +00:00
495f247570
Replace ve.trackRegisterHandler with two methods: ve.trackSubscribe and ve.trackSubscribeAll. The former takes an additional string argument 'topic', which specifies a string prefix on which to match event names. The callback is only called on matching events. The latter, ve.trackSubscribeAll, binds a handler to all track events, regardless of topic. This patch simplifies argument-handling by eliminating variadic ve.track calls in favor of a single object that encodes all event data. The loose coupling of track event emitters and subscribers makes relying on unnamed positional argument conventions brittle; property access works better. Change-Id: I3b58ce0f48ad3c9b56fcaa9c2226cc79bbcd4051 |
||
---|---|---|
.. | ||
ce | ||
dm | ||
init | ||
test | ||
ui | ||
ve.BranchNode.js | ||
ve.debug.js | ||
ve.Document.js | ||
ve.Element.js | ||
ve.EventEmitter.js | ||
ve.EventSequencer.js | ||
ve.Factory.js | ||
ve.js | ||
ve.LeafNode.js | ||
ve.Node.js | ||
ve.Range.js | ||
ve.Registry.js | ||
ve.track.js |