mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-28 16:20:52 +00:00
246c655b28
This patch adds ve.track; it provides a means for VisualEditor code to log various changes of state that are of potential analytic interest. This is done without coupling VisualEditor to a particular analytics framework by providing a method, ve.hook.registerHandler, by which event data may be routed to a particular analytic framework for processing and dispatch. ve.track uses a $.Callbacks-like object for tracking analytic events which can remember an arbitrary number of past events. This is done by maintaining an array containing the arguments of past calls and maintaining a counter for each callback indicating its position in the queue (i.e., how many events it has already received.) This ensures handlers are called for each event, including events which were fired before the handler was registered. This allows the load-order of VE and analytics components to remain unspecified. Change-Id: I29740fa7a0ac403e484e0acee6dfcadaf6fc4566 |
||
---|---|---|
.. | ||
ce | ||
dm | ||
init | ||
test | ||
ui | ||
ve.BranchNode.js | ||
ve.debug.js | ||
ve.Document.js | ||
ve.Element.js | ||
ve.EventEmitter.js | ||
ve.Factory.js | ||
ve.js | ||
ve.LeafNode.js | ||
ve.NamedClassFactory.js | ||
ve.Node.js | ||
ve.Range.js | ||
ve.Registry.js | ||
ve.track.js |