(Sorry for the cross-posting, but this answer I gave to a similar question works fine here)
I have created a small object.watch shim for this a while ago. It works in IE8, Safari, Chrome, Firefox, Opera, etc.
More Related Contents:
- event.preventDefault() vs. return false
- window.onload vs $(document).ready()
- Getting the ID of the element that fired an event
- jQuery.click() vs onClick
- Trigger a keypress/keydown/keyup event in JS/jQuery?
- window.onbeforeunload and window.onunload is not working in Firefox, Safari, Opera?
- Firing event on DOM attribute change
- Listening for variable changes in JavaScript
- Jquery Event won’t fire after ajax call
- jQuery equivalent of JavaScript’s addEventListener method
- Way to know if user clicked Cancel on a Javascript onbeforeunload Dialog?
- Intercept all ajax calls?
- How do you detect the clearing of a “search” HTML5 input?
- How to check if any JavaScript event listeners/handlers attached to an element/document? [duplicate]
- How to delay calling of javascript function?
- Mozilla firefox not working with window.onbeforeunload
- Implementing jQuery’s “live” binder with native Javascript
- How to tell which row number is clicked in a table?
- full-screen browser window on load document
- Javascript change event on input element fires on only losing focus
- Only fire an event once?
- Detecting an image 404 in Javascript
- Is it possible to catch browser’s File Open/Save dialog event using Javascript
- JavaScript/jQuery event listener on image load IE issues
- Fire oninput event with jQuery
- How do you force your Javascript event to run first, regardless of the order in which the events were added?
- How can I tell when a CSS background image has loaded? Is an event fired? [duplicate]
- Capturing result of window.onbeforeunload confirmation dialog
- How to execute code in a javascript append
- In web browsers, what’s the difference between onblur and onfocusout?