WOW! WatchJS became so popular that I've been pushed to migrate it to GitHub
https://github.com/melanke/Watch.JS
Just kidding
WOW! WatchJS became so popular that I've been pushed to migrate it to GitHub
https://github.com/melanke/Watch.JS
Just kidding
@penartur it is explained in the paragraph "Chill out, no surprises, new attributes will not be considered"
This is really useful. Thanks. One question: when watching more than one properties, is there a way to see what and how it was changed? i.e.:
o.watch(["x","y","z"], function (id, oldval, newval) {
console.log( "o." + id + " changed from " + oldval + " to " + newval );
});
With the new version of Watch.JS it is possible
Here is a sample:
http://jsfiddle.net/XnbXS/1/
Read the short-full-documentation:
https://github.com/melanke/Watch.JS
It is not that obvious from the readme that
watchAll
only watches for properties that were defined at the moment of call towatchAll
.E.g.