add
Specify how to observe a value that is currently being read.
ObservationRecorder.add(object [,event] )
Signals that an object should be observed. Adds the observable being read to the top of the stack.
// for objects with observable properties:
ObservationRecorder.add( object, "prop" );
// for observables that represent a single value:
ObservationRecorder.add( object );
Parameters
- object
{Object}
:An observable object which is being observed.
- event
{String}
:The name of the event (or property) that is being observed.
If an event is provided, the object and event will be in the
.keyDependencies
of stop's returned observation record. It's expected that the object implements can.onKeyValue.If no
event
is provided, the objet will be added in the.valueDependencies
of stop's returned observation record. It's expected that the object implements can.onValue.