@can.onInstanceBoundChange
Listen to when any instance is bound for the first time or all handlers are removed.
canReflect.onInstanceBoundChange(Type, handler(instance, isBound) )
canReflect.onInstanceBoundChange(Person, function(person, isBound){
console.log("isBound");
});
Parameters
- handler
{function(instance, isBound)}
:A function is called when an instance is bound or unbound.
isBound
will betrue
when the instance becomes bound andfalse
when unbound.