mediawiki-extensions-Visual.../modules/ve/dm
Trevor Parscal 7233ea8f1b EventEmitter API cleanup
The EventEmitter API we inherited from Node.js and then bastardized was
getting awkward and cumbersome. The number of uses of ve.bind was getting
out of control, and removing events meant caching the bound method in a
property. Many of the "features" of EventEmitter wasn't even being used,
some causing overhead, others just causing bloat. This change cleans up
how EventEmitter is used throughout the codebase.

The new event emitter API includes:
* emit - identical to the previous API, no longer throws an error if you
  emit error without a handler
* once - identical to the previous API, still introduces a wrapper* on -
  compatible with the previous API but has some new features
* off - identical to removeListener in the previous API
* connect - very similar to addListenerMethods but doesn't wrap callbacks
  in closures anymore
* disconnect - new, basically the opposite of addListenerMethods

Another change that is made in this commit is mixing in rather than
inheriting from EventEmitter.

Finally, there are changes throughout the codebase anywhere
connect/disconnect could be used.

Change-Id: Ic3085d39172a8a719ce7f036690f673e59848d3a
2013-05-02 15:05:59 -07:00
..
annotations Actually use the doc parameter in toDomElements() 2013-04-09 23:48:03 +00:00
lineardata Fix range translation for surface fragments 2013-04-30 17:08:15 +01:00
metaitems Create meta item for defaultsort 2013-04-29 15:33:37 +01:00
nodes GeneratedContentNodes store DOM elements, not HTML (like aliens) 2013-05-02 18:22:56 +01:00
ve.dm.Annotation.js Actually use the doc parameter in toDomElements() 2013-04-09 23:48:03 +00:00
ve.dm.AnnotationFactory.js Convert AnnotationFactory and MetaItemFactory to NamedClassFactories 2013-04-09 12:05:05 -07:00
ve.dm.AnnotationSet.js Further AnnotationSet optimisation: create containsIndex 2013-04-25 22:55:43 +01:00
ve.dm.BranchNode.js Fix documentation to place @emits in the correct place 2013-03-25 21:06:05 +00:00
ve.dm.Converter.js Remove all code related to change markers 2013-04-30 23:15:47 +01:00
ve.dm.DataString.js UnicodeJS library to implement Unicode standards 2013-03-27 17:44:22 +00:00
ve.dm.Document.js Allow fixUpInsertion to move offsets when inserting at start/end 2013-04-26 22:52:27 +00:00
ve.dm.DocumentSlice.js Bump copyright notice year range to -2013 over -2012 2013-02-19 15:37:34 -08:00
ve.dm.DocumentSynchronizer.js Deduplicate childUpdate events based on transaction and appliedness 2013-04-25 17:08:30 -07:00
ve.dm.IndexValueStore.js GeneratedContentNodes store DOM elements, not HTML (like aliens) 2013-05-02 18:22:56 +01:00
ve.dm.InternalList.js EventEmitter API cleanup 2013-05-02 15:05:59 -07:00
ve.dm.js Bump copyright notice year range to -2013 over -2012 2013-02-19 15:37:34 -08:00
ve.dm.LeafNode.js Store data in LinearData class with an index-value store for objects 2013-03-30 10:06:34 +00:00
ve.dm.LinearData.js Store data in LinearData class with an index-value store for objects 2013-03-30 10:06:34 +00:00
ve.dm.MetaItem.js Transactions to store metadata merge info when present 2013-04-16 22:26:56 +01:00
ve.dm.MetaItemFactory.js Convert AnnotationFactory and MetaItemFactory to NamedClassFactories 2013-04-09 12:05:05 -07:00
ve.dm.MetaList.js EventEmitter API cleanup 2013-05-02 15:05:59 -07:00
ve.dm.Model.js Add data model support for MediaWiki references 2013-04-23 10:17:42 +01:00
ve.dm.ModelRegistry.js Convert AnnotationFactory and MetaItemFactory to NamedClassFactories 2013-04-09 12:05:05 -07:00
ve.dm.Node.js Allow merging of content nodes with nodes that can contain content (but are not content themself) 2013-04-30 12:09:22 -07:00
ve.dm.NodeFactory.js Add data model support for MediaWiki references 2013-04-23 10:17:42 +01:00
ve.dm.Surface.js EventEmitter API cleanup 2013-05-02 15:05:59 -07:00
ve.dm.SurfaceFragment.js Fix range translation for surface fragments 2013-04-30 17:08:15 +01:00
ve.dm.Transaction.js Merge "When annotating, skip any branch nodes that are content" 2013-05-01 18:06:34 +00:00
ve.dm.TransactionProcessor.js Remove all code related to change markers 2013-04-30 23:15:47 +01:00