on
Registers an event handler for a specified event.
Parameters
event
The event name.
handler
The handler function to execute when the event is triggered.
Registers an event handler for a specified event.
The event name.
The handler function to execute when the event is triggered.