Internet Explorer中MutationObservers的可用性

ccu*_*nni 5 javascript internet-explorer dom-manipulation mutation-observers

IE中尚未提供AFAIK突变观察器。Chrome,Safari,Firefox在标准化过程中都有其实现方式和工作方式。我想知道是否有人(最好是MS员工)知道IE的故事,或者是否可以给我指向我错过的文章的指针。

Pau*_*tte 1

最近有一篇关于Windows 8应用程序开发的文章,其中使用onpropertychange处理 DOM 突变。

\n\n
\n

示例 4:处理 ARIA 选择的属性的 onpropertychange 以检测选项卡选择的编程更改。

\n
\n\n
    tabElement.attachEvent("onpropertychange", selectionChanged);\n\n    function selectionChanged(event) \n     {\n     if (event.propertyName === "aria-selected")\n       {\n       if (event.srcElement.getAttribute("aria-selected") === "true") \n         {\n         // execute code to load the content that corresponds with the selected tab element \n         } \n       else \n         {\n         // execute code for deselected tab, if needed\n         }\n       }\n     }\n
Run Code Online (Sandbox Code Playgroud)\n\n

参考

\n\n\n