查找哪些 javascript 更改了 DOM? [英] Find what javascript changes the DOM?

查看:33
本文介绍了查找哪些 javascript 更改了 DOM?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近一直在处理大量其他人的 JS,并且开始非常讨厌尝试调试它.即使使用 Chrome 的开发工具,我也无法追踪页面加载期间发生的许多 DOM 更改.

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 changes that are taking place during page load.

有什么工具可以告诉我 DOM 的哪一部分(比如添加的属性)是由什么 JS 完成的?

Are there any tools that will show me what part of the DOM (say an added attribute) was done by what JS?

谢谢

推荐答案

在 Chrome 开发工具中,您可以选择在 DOM 更改时中断执行.

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

还有一个截图来说明 Wolfram 的答案(+1)

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

这篇关于查找哪些 javascript 更改了 DOM?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆