mediawiki-extensions-Visual.../modules/ve/ui/tools/buttons
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
..
ve.ui.BoldButtonTool.js Major UI refactoring and improvements 2013-02-26 12:29:08 -08:00
ve.ui.BulletButtonTool.js Major UI refactoring and improvements 2013-02-26 12:29:08 -08:00
ve.ui.ClearButtonTool.js Store data in LinearData class with an index-value store for objects 2013-03-30 10:06:34 +00:00
ve.ui.IndentButtonTool.js Major UI refactoring and improvements 2013-02-26 12:29:08 -08:00
ve.ui.ItalicButtonTool.js Major UI refactoring and improvements 2013-02-26 12:29:08 -08:00
ve.ui.LinkButtonTool.js Major UI refactoring and improvements 2013-02-26 12:29:08 -08:00
ve.ui.MediaButtonTool.js Media dialog support 2013-04-05 11:52:57 -07:00
ve.ui.MWLinkButtonTool.js Major UI refactoring and improvements 2013-02-26 12:29:08 -08:00
ve.ui.NumberButtonTool.js Major UI refactoring and improvements 2013-02-26 12:29:08 -08:00
ve.ui.OutdentButtonTool.js Major UI refactoring and improvements 2013-02-26 12:29:08 -08:00
ve.ui.RedoButtonTool.js EventEmitter API cleanup 2013-05-02 15:05:59 -07:00
ve.ui.UndoButtonTool.js EventEmitter API cleanup 2013-05-02 15:05:59 -07:00