admin管理员组文章数量:1291503
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.
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.
Share edited Jan 12, 2014 at 19:25 megawac 11.4k6 gold badges42 silver badges61 bronze badges asked Dec 18, 2012 at 20:59 ccunniccunni 1351 gold badge2 silver badges7 bronze badges 3- 2 You're wondering why IE is behind others with implementing something? – Ian Commented Dec 18, 2012 at 21:03
- 1 sadly, caniuse. is silent on the topic. – John Dvorak Commented Dec 18, 2012 at 21:04
- Thanks Jan. Ian, I'm not wondering why they're behind, I'm wondering how long they'll be behind, and if they already offer some faster alternative to binding to the DOM mutation events. – ccunni Commented Dec 31, 2012 at 23:23
3 Answers
Reset to default 3IE 11 supports MutationObservers
natively. For IE 9-10 you can use this polyfill:
https://github./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
For patibility with IE9-10, https://github./webmodules/mutation-observer exposes the native MutationObserver API provided by the browser, or a polyfill based on mutation events.
本文标签: javascriptAvailability of MutationObservers in Internet ExplorerStack Overflow
版权声明:本文标题:javascript - Availability of MutationObservers in Internet Explorer - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741534459a2383949.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论