mediawiki-extensions-Visual.../modules/ve/ce
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 Great Annotation Refactor of 2013 2013-04-08 18:10:16 -07:00
nodes EventEmitter API cleanup 2013-05-02 15:05:59 -07:00
styles (bug 47746) Fixing Phantom placement in RTL 2013-04-29 17:00:29 -07:00
ve.ce.Annotation.js Add ve.ce.View as a common base class for ce.Node and ce.Annotation 2013-04-09 12:05:05 -07:00
ve.ce.AnnotationFactory.js Rename ve.NodeFactory to ve.NamedClassFactory 2013-04-09 12:05:05 -07:00
ve.ce.BranchNode.js EventEmitter API cleanup 2013-05-02 15:05:59 -07:00
ve.ce.ContentBranchNode.js EventEmitter API cleanup 2013-05-02 15:05:59 -07:00
ve.ce.Document.js Merge "Inside ve.ce.Document.getRelativeOffset fallback to 'character' mode if 'word' mode returns the same offset as was passed originally" 2013-04-16 22:54:27 +00:00
ve.ce.DomRange.js DomRange makes more sense as a name for this class (cause it is not rangy specific). 2013-03-05 12:18:59 -08:00
ve.ce.FocusableNode.js Allow node focusing 2013-04-18 13:54:37 -07:00
ve.ce.js Allow node relocation 2013-04-19 12:07:18 -07:00
ve.ce.LeafNode.js Store data in LinearData class with an index-value store for objects 2013-03-30 10:06:34 +00:00
ve.ce.Node.js EventEmitter API cleanup 2013-05-02 15:05:59 -07:00
ve.ce.NodeFactory.js Rename ve.NodeFactory to ve.NamedClassFactory 2013-04-09 12:05:05 -07:00
ve.ce.RelocatableNode.js Allow node relocation 2013-04-19 12:07:18 -07:00
ve.ce.ResizableNode.js EventEmitter API cleanup 2013-05-02 15:05:59 -07:00
ve.ce.Surface.js EventEmitter API cleanup 2013-05-02 15:05:59 -07:00
ve.ce.SurfaceObserver.js EventEmitter API cleanup 2013-05-02 15:05:59 -07:00
ve.ce.View.js New static property - renderHtmlAttributes 2013-04-25 14:42:12 -07:00