Class M.Observable
Extends
M.Object.
The observable knows all observers, mainly views, and pushes updates if necessary.
Defined in: observable.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Field Attributes | Field Name and Description |
---|---|
List that contains pairs of an observer with an observable.
|
|
The type of this object.
|
Method Attributes | Method Name and Description |
---|---|
attach(observer, observable)
Attach an observer to an observable.
|
|
detach(observer)
Detach an observer from an observable.
|
|
notifyObservers(key)
Notify all observers that observe the property behind 'key'.
|
Field Detail
{Array|Object}
bindingList
List that contains pairs of an observer with an observable. An observer is tightened to one
observable, but one observable can have multiple observers.
{String}
type
The type of this object.
Method Detail
attach(observer, observable)
Attach an observer to an observable.
- Parameters:
- {String} observer
- The observer.
- {String} observable
- The observable.
detach(observer)
Detach an observer from an observable.
- Parameters:
- {String} observer
- The observer.
notifyObservers(key)
Notify all observers that observe the property behind 'key'.
- Parameters:
- {String} key
- The key of the property that changed.