addEventListener
addEventListener(event: , 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:
Event class (i.e., AppEvents.Started)
callback:
Function
Handler function. A single parameter is passed - object with event information
Returns
type:
void