Subscribe a callback function to events of the given type.
Parameters:
Name | Type | Description |
---|---|---|
type |
string | The type of event for which to listen. |
handler |
eventHandler | The event handler callback function. |
- Source: