Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Availability of MutationObservers in Internet Explorer

AFAIK mutation observers are not available yet in IE. Chrome, Safari, Firefox have their implementations and its working its way through the standardization process. I'm wondering if anyone (preferably MS employee) knows the story with IE, or might give me a pointer to an article I missed.

like image 594
ccunni Avatar asked Oct 06 '22 15:10

ccunni


2 Answers

IE 11 supports MutationObservers natively. For IE 9-10 you can use this polyfill: https://github.com/Polymer/MutationObservers

like image 52
Handsome Nerd Avatar answered Oct 10 '22 03:10

Handsome Nerd


There's a recent article on Windows 8 app development which uses onpropertychange to handle DOM mutation.

Example 4: Handle onpropertychange for ARIA-selected property to detect programmatic change of tab selection.

    tabElement.attachEvent("onpropertychange", selectionChanged);

    function selectionChanged(event) 
     {
     if (event.propertyName === "aria-selected")
       {
       if (event.srcElement.getAttribute("aria-selected") === "true") 
         {
         // execute code to load the content that corresponds with the selected tab element 
         } 
       else 
         {
         // execute code for deselected tab, if needed
         }
       }
     }

References

  • Make your HTML/JavaScript app accessible – Windows 8 app developer blog

  • onpropertychange for a textbox in Firefox?

  • callback from flashembed of jquery Tools

like image 32
Paul Sweatte Avatar answered Oct 10 '22 01:10

Paul Sweatte