new on(event, listener)
Attach an event listener to the passed event.
Parameters:
| Name | Type | Description |
|---|---|---|
event |
String | The name of the event to listen for. |
listener |
function | The method to call when the event is fired. |
- Source: