Instance Method

addEventListener

Adds an event listener as a callback for an event name.

Declaration

void addEventListener(name, callback);

Parameters

name

The name of the event.

callback

The callback function to invoke when the event occurs.