简体   繁体   English

DOM Mutation Observers的跨浏览器支持状态是什么?

[英]What's the state of cross-browser support for DOM Mutation Observers?

I googled but couldn't find an answer. 我用Google搜索但找不到答案。

Is there a cross-browser compatibility matrix available for this feature? 是否有可用于此功能的跨浏览器兼容性矩阵?

In case anybody wants to know the answer, here it is: Mutation Observers vs Mutation Events/Browser Availability . 如果有人想知道答案,这里是: Mutation Observers vs Mutation Events / Browser Availability

Ido Green provided the answer, but for clarity I will post relevant snippets of the linked docs here. Ido Green提供了答案,但为了清楚起见,我将在此处发布链接文档的相关摘要。

https://developer.mozilla.org/en-US/docs/DOM/Mutation_events https://developer.mozilla.org/en-US/docs/DOM/Mutation_events

DOM Mutation Events are now deprecated. DOM Mutation事件现已弃用。

The mutation events have been marked as deprecated in the DOM Events specification, as the API's design is flawed (see details in the "DOM Mutation Events Replacement: The Story So Far / Existing Points of Consensus" post to public-webapps). 由于API的设计存在缺陷,因此突变事件已在DOM事件规范中标记为已弃用(请参阅“DOM突变事件替换:迄今为止的故事/现有共​​识点”中的详细信息发布到public-webapps)。

The practical reasons to avoid the mutation events are performance issues and cross-browser support. 避免突变事件的实际原因是性能问题和跨浏览器支持。

These are being replaced by DOM Mutation Observers. 这些正在被DOM Mutation Observers取代。

https://developer.mozilla.org/en-US/docs/DOM/MutationObserver https://developer.mozilla.org/en-US/docs/DOM/MutationObserver

Mutation Observers provides developers a way to react to changes in a DOM. Mutation Observers为开发人员提供了一种对DOM变化做出反应的方法。 It is designed as a replacement for Mutation Events defined in the DOM3 Events specification. 它被设计为DOM3 Events规范中定义的Mutation Events的替代品。

This feature (DOM mutation) is working from Chrome 18. You can see more details here: http://updates.html5rocks.com/2012/02/Detect-DOM-changes-with-Mutation-Observers 此功能(DOM突变)正在使用Chrome 18.您可以在此处查看更多详细信息: http//updates.html5rocks.com/2012/02/Detect-DOM-changes-with-Mutation-Observers

In case you wish to check 'any' HTML5 feature and the browsers that support it: http://caniuse.com/ is the place. 如果您想检查“任何”HTML5功能以及支持它的浏览器: http//caniuse.com/就是这个地方。 Other great source is: http://html5please.com/ 其他很棒的来源是: http//html5please.com/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM