offPatches
Unregister an object patches handler from an observable object
offPatches(obj, handler, [queueName])
Unregister an event handler from the object obj
that had previously been registered with
onPatches. The function passed as handler
will no longer be called
when obj
has key or index changes.
var obj = new DefineMap({});
var handler = function(patches) {
console.log(patches);
};
canReflect.onPatches(obj, handler);
canReflect.offPatches(obj, handler);
obj.set("foo", "bar"); // nothing is logged
Parameters
- obj
{*}
: - handler
{function(*)}
: - queueName
{String}
:the name of the queue in [can-queues] the handler was registered under