new Observer(callback, unbind)
Creates an Observer.
Parameters:
| Name | Type | Description |
|---|---|---|
callback |
function | The function that is invoked when the observer is notified. |
unbind |
function | The function that is called when the observer is disposed. |
Methods
-
callback(event)
-
Notifies the callback with this event.
Parameters:
Name Type Description eventevent Emitted event.
-
dispose()
-
Disposes the observer.
-
start()
-
Starts the observing;
-
stop()
-
Stops the observing.