Class: EventDispatcher

EventDispatcher

Partly implements the interface EventTarget.

Methods


addEventListener(p_type, p_callback)

Adds a callback function for a specific type. One and the same function can only be added once for each type. If it is tried to add a function again for a specific type, the method returns without any modification or reaction.
Parameters:
Name Type Description
p_type string
p_callback function
Source:
Fires:
  • this.event:v_initial_events[p_type]

dispatchEvent(p_type, p_detail)

Handles events of type String or Event by invoking all callback functions that have been registered for that type.
Parameters:
Name Type Argument Default Description
p_type string | Event
p_detail Object <nullable>
null Detail information passed to the listener
Source:

removeEventListener(p_type, p_callback)

Removes a callback function for a specific type, if it exists.
Parameters:
Name Type Description
p_type string
p_callback function
Source: