Watch for object properties changes in JavaScript [duplicate]
Possible Duplicate: Javascript Object.Watch for all browsers? I just read Mozilla's documentation for the watch() method . It looks very useful. However, I can't find something similar for Safari. Neither Internet Explorer. How do you manage portability across browsers? I have created a small object.watch shim for this a while ago. It works in IE8, Safari, Chrome, Firefox, Opera, etc. /* * object.watch v0.0.1: Cross-browser object.watch * * By Elijah Grey, http://eligrey.com * * A shim that partially implements object.watch and object.unwatch * in browsers that have accessor support. * *