melanke / Watch.JS

watch the changes of any object or attribute
Other
2.14k stars 219 forks source link

document.cookie cannot be watched? #91

Closed vekexasia closed 6 years ago

vekexasia commented 9 years ago

I'm trying to watch document.cookie using

watch(document, "cookie", function() {
console.log(arguments);
});

but it never triggers.

melanke commented 6 years ago

Usually you will use WatchJS to observe your own objects. Since document.cookie is implemented by the browser it may be constructed in a different way.