melanke / Watch.JS

watch the changes of any object or attribute

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unwatch in a callback function

kelvien opened this issue · comments

Can we actually do an unwatch on the callback function?

For an example:

var callback1 = function(){
// Some process
unwatch(this, "a");
}

watch(this, "a", callback1)

I can't seem to have this to work