Find what javascript changes the DOM?

前端 未结 2 344
野性不改
野性不改 2020-12-02 15:32

I\'ve been working with a ton of other\'s JS recently, and am starting to really hate trying to debug it. Even with Chrome\'s dev tools I can\'t track down a lot of the DOM

相关标签:
2条回答
  • 2020-12-02 15:47

    A minor addition to Jayraj's answer: Breakpoints on DOM Mutation Events. Right click on any element and you can select Break on Subtree Modifications and Break on Attributes Modifications and Break on Node Removal.

    This is also possible using Firebug: right click an element and you have some options to monitor it for changes.

    0 讨论(0)
  • 2020-12-02 16:09

    In Chrome dev tools, you have the option of breaking execution when the DOM changes. enter image description here

    Also a screenshot to illustrate Wolfram's answer (+1)

    enter image description here

    0 讨论(0)
提交回复
热议问题