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.
IE 11 supports MutationObservers
natively. For IE 9-10 you can use this polyfill:
https://github.com/Polymer/MutationObservers
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With