I used Firefox. It looks like the MutationObserver object is supported only in IE11:
- You can try using onpropertychange event
Actually it doesn't work in IE9 or if Document Mode is set to IE9. It works otherwise.
Thank you very much everyone who helped.