Ticket #2340 (closed bug: fixed)
[UI] Dispatched Events
| Reported by: | scott.gonzalez | Owned by: | scott.gonzalez |
|---|---|---|---|
| Priority: | blocker | Milestone: | 1.5.1 |
| Component: | ui.core | Version: | 1.5 |
| Keywords: | ui event | Cc: |
Description
There are currently three models being used for dispatching events in the UI plugins.
accordion:
$(el).triggerHandler('<action>.ui-<plugin>', [ui], callback);
dialog, draggable, droppable, resizable, selectable, slider, sortable
$(el).triggerHandler('<plugin><action>', [e, ui], callback);
tabs:
$(el).triggerHandler('<action>.ui-<plugin>', [ui]);
The accordion and tabs models are both missing the event object in the data parameter. The tabs model is also missing the callback.
However, it is unclear which event naming convention should be used. The more widely used "<plugin><action>" convention seems more likely to avoid collisions with other event names. However, the "<action>.ui-<plugin>" convention provides the convenience of having user-defined events be cleaned up if the plugin's destroy method is called.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/nologo.gif)