mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-25 06:46:26 +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 |
||
---|---|---|
.. | ||
jquery | ||
jquery.uls | ||
oojs | ||
qunit | ||
rangy | ||
syntaxhighlight | ||
unicodejs | ||
ve | ||
ve-mw |