interface ObservableObject.EventDelegate
A type of object that can be used to handle events from other (attached) objects.
interface EventDelegate;
Notes
- This interface must be matched by the
delegateobject that’s passed to ObservableObject.attach(), as part of the ObservableObject.AttachListener object argument. - In practice, the required
delegatemethod is often defined on the attached parent itself, to handle events from attached objects such as (nested) views. In that case, the parent object itself can be passed to ObservableObject.attach() as{ delegate: this }. - The
delegatemethod is expected to return undefined or false if the event should be propagated on the parent object. Otherwise, the method should return true, or a promise for asynchronous error handling.
Instance members
delegate()
A required method that handles the provided event.
Related
class ObservableObject
The base class of all observable objects, which can be placed into a tree structure to enable event handling and data binding.attach() protected
Attaches the specified observable object to this object.
