zerk.observable Class
Observable
This class implements the observer pattern.
All observable classes should inherit from here.
Methods
fireEvent
(
Boolen
-
event
Fire event
Parameters:
-
event
StringEvent name
Returns:
Boolen:
Returns false when the bubble was canceled
init
()
Class constructor
on
(
-
event
-
callback
-
scope
Register event handler
Parameters:
-
event
StringEvent name
-
callback
FunctionCallback function. Return false to cancel event bubble.
-
scope
ObjectScope to be used in callback function
un
(
Boolen
-
event
-
callback
Unregister event handler
Parameters:
-
event
StringEvent name
-
callback
FunctionCallback function
Returns:
Boolen:
Returns true on success
Properties
_eventListeners
Array
protected
List of event handlers