开发者

js changes to DOM

开发者 https://www.devze.com 2023-03-05 09:36 出处:网络
I am searching for a way to get notified when a js is changing/mutating the page\'s DOM, and know which js caused the change.

I am searching for a way to get notified when a js is changing/mutating the page's DOM, and know which js caused the change. How can I achieve this? Is there a way to do so using Jav开发者_如何学Goa? In JavaScript? Any other way? Thanks, Inbar.


You want to add an event listener to listen for Mutation events.

http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-eventgroupings-mutationevents

Update: I see from other answers that there might be problems with IE support. See Detect changes in the DOM

0

精彩评论

暂无评论...
验证码 换一张
取 消