Rate this page:

addEventListener

Copy URL
addEventListener(event: 

AppEvents

,
callback:

Function

):

void

Adds a handler for the specified AppEvents event. Use only functions as handlers; anything except a function leads to the error and scenario termination when a handler is called.

Parameters

  • event:

    AppEvents

    Event class (i.e., AppEvents.Started)

  • callback:

    Function

    Handler function. A single parameter is passed - object with event information

Returns

  • type:

    void