Observable
Observable for custom event library
Methods
-
bind(eventName, handler, context, bListenOnce) ¶Registers a handler to be called when eventName fires.Parameters:
-
bListenOnce{@ignore}
-
handler{Function}
A handler function to execute when the event fires.
-
context{Object}
Optional
Context in which the handler function should execute.
-
eventName{String}
A string containing the name of the event.
-
bListenOnce{@ignore}
-
listenOnce(eventName, handler, context) ¶Registers a one time handler to be called when eventName fires. It is automatically removed after the first time the event fires.Parameters:
-
eventName{String}
A string containing the name of the event.
-
handler{Function}
A handler function to execute when the event fires.
-
context{Object}
Optional
Context in which the handler function should execute.
- See:
- bind
-
eventName{String}
-
unbind(eventName, handler, context) ¶Unregisters a handler for eventName.Parameters:
-
eventName{String}
A string containing the name of the event.
-
handler{Function}
A handler function to execute when the event fires.
-
context{Object}
Optional
Context in which the handler function should execute.
-
eventName{String}