mediawiki-extensions-Visual.../modules/ve/ui
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
..
dialogs EventEmitter API cleanup 2013-05-02 15:05:59 -07:00
elements Remove singular adding for ve.ui.GroupElement 2013-04-30 17:50:22 +00:00
inspectors Merge "Fix range translation for surface fragments" 2013-04-30 17:58:39 +00:00
layouts UI Refactor 2013-04-26 21:18:13 +00:00
styles Merge changes I5eafaa48,Ia8f23a37,I17534d67,If5ed1b64 2013-04-30 18:34:26 +00:00
tools EventEmitter API cleanup 2013-05-02 15:05:59 -07:00
widgets EventEmitter API cleanup 2013-05-02 15:05:59 -07:00
ve.ui.Context.js EventEmitter API cleanup 2013-05-02 15:05:59 -07:00
ve.ui.Dialog.js EventEmitter API cleanup 2013-05-02 15:05:59 -07:00
ve.ui.DialogFactory.js UI "Views" refactor 2013-04-18 15:53:50 -07:00
ve.ui.Element.js Doc: Replace "@property @type {Type}" with "@property {Type}". 2013-03-28 21:21:56 +01:00
ve.ui.Frame.js EventEmitter API cleanup 2013-05-02 15:05:59 -07:00
ve.ui.Inspector.js EventEmitter API cleanup 2013-05-02 15:05:59 -07:00
ve.ui.InspectorFactory.js UI "Views" refactor 2013-04-18 15:53:50 -07:00
ve.ui.js Fix ve.ui.get$$'s handling of jQuery selection 2013-04-22 20:36:42 +00:00
ve.ui.Layout.js Layouts, grids and panels 2013-03-15 15:12:56 -07:00
ve.ui.Tool.js EventEmitter API cleanup 2013-05-02 15:05:59 -07:00
ve.ui.Toolbar.js EventEmitter API cleanup 2013-05-02 15:05:59 -07:00
ve.ui.ToolFactory.js Bump copyright notice year range to -2013 over -2012 2013-02-19 15:37:34 -08:00
ve.ui.ViewRegistry.js Link inspector fixes 2013-04-24 18:29:55 -07:00
ve.ui.Widget.js Layouts, grids and panels 2013-03-15 15:12:56 -07:00
ve.ui.Window.js EventEmitter API cleanup 2013-05-02 15:05:59 -07:00
ve.ui.WindowSet.js EventEmitter API cleanup 2013-05-02 15:05:59 -07:00