Since v.2 w2ui provide an easy way to extend functionality of any widget or create custom ones. All widgets are written
as classes that extend w2base class.
This base class only has the event flow functionality:
handlers, - an array of all event handlers defined for the class
That you can use it to add event listeners and trigger events.
See events for additional information.
Below is an example how to create your own custom control.