yui/yui3 — comment on commit c6f34ab5211f002c70255bb7423b57e2bbbf39ff
File:  line 0
By sdesai:

That is how UI_EVENTS is supposed to be used.

You're supposed to override it if you don't want to expose the default set of UI events on your Widget.

My opinion on UI_EVENTS, when it was introduced, was that it should be empty by default [ opt-in as opposed to opt-out ]. Not sure we can change that at this point though. We could make selective opting out less complex than cloning/deleting.

The other angle we discussed, the 3.6.0 angle, was to see if there's a way for Widget to introspect the event/synthetic event subsystem to avoid listening for events which don't apply to that type of Node/Widget - so autocomplete wouldn't need to override UI_EVENTS. But UI_EVENTS would avoid attaching listeners which don't make sense for DIVs for example. Currently it's assumed that all events in DOM_EVENTS, apply to *all* types of DOM nodes - since we can't tell any better (programmatically).