Events
HTML5 has an eventing mechanism that works for HTML elements. But, it cannot be used to add events to arbitrary objects, such as controls and collections.
To handle this, we defined an Event class. Any class may define events by declaring them as fields, and any class may add or remove event handlers using the event's addHandler and removeHandler methods.
You may also declare event handlers as options in the initialize method of any MVC control.
These event handlers take two parameters: sender and args. Sender is an object that raised the event, and args is an object that contains the event parameters.
Below are some input controls with the event handlers attached to them: