new EventDispatcher()
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_typestring p_callbackfunction Fires:
- this.event:v_initial_events[p_type]
-
dispatchEvent(p_type, p_detail)
-
Handles events of type String or
Eventby invoking all callback functions that have been registered for that type.Parameters:
Name Type Argument Default Description p_typestring | Event p_detailObject <nullable>
null Detail information passed to the listener -
removeEventListener(p_type, p_callback)
-
Removes a callback function for a specific type, if it exists.
Parameters:
Name Type Description p_typestring p_callbackfunction