Attaching event listeners
You can add any handler to the events of Sidebar. To do this, use the sidebar.events.on() method with the following parameters:
|evName||name of the event|
|evHandler||user-defined event handler|
Several handlers can be attached to one and the same event, and all of them will be executed.
The names of the events are case-insensitive.
Related sample: Sidebar. Events
Detaching event listeners
There is a simple way of removing an event handler with the sidebar.events.detach() method:
A custom event can be called with the fire() method of the events module:
List of supported events
You can find the full list of sidebar events in the API section.