Now on: joopl.Event
Represents a multi-cast event.
An event is an observable object which notifies multiple objects listening event raises.
Constructor
joopl.Event
(
final
-
source
Parameters:
-
source
ObjectThe object who will be raising this event
Methods
addEventListener
(
Void
-
handler
Adds and binds a function to this event that will be called whenever this event is raised.
It supports unlimited event listeners and they will be called in order FIFO.
Parameters:
-
handler
FunctionA function reference which handles the event
Returns:
Void:
addEventListener
(
Void
-
handler
Removes and unbinds a function from this event.
Given function handler should be the one that was previously added with addEventListener
.
Parameters:
-
handler
FunctionA function reference which handles the event
Returns:
Void:
Properties
handlers
Unknown
private
Gets an array of event handlers listenting for event raise
source
Object
private
Gets the object who raises the event