在 Chrome 开发者工具配置文件快照中识别 HTML 元素
我的网络应用程序出现内存泄漏。看起来似乎不再需要对 HTML 元素的引用,我可以在 Chrome 开发人员工具配置文件快照中看到这一点。如何确定快照摘要视图中显示了哪些 HTML 元素?例如,在下面的屏幕截图中,我正在深入研究 HTMLAnchorElement,我想知道那是哪一个。如果我可以获得元素的“className”或“innerHTML”值,我将能够识别它,但我似乎无法获取这些值。有人知道我该怎么做吗?
I've got a memory leak in my web app. It looks like there are references to HTML elements that are no longer necessary and I can see this in the Chrome Developer Tools Profile Snapshots. How can I identify which HTML elements are being displayed in the Snapshot Summary view? For example, in the screenshot below, I'm diving into an HTMLAnchorElement and I'd like to know which one that is. If I can get the "className" or "innerHTML" values of the element, I will be able to identify it, but I can't seem to get the values. Anyone know how I can do this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不确定我是否正确理解了这个问题,但您可能想查看一下用于查找分离的 DOM 树条目的文档:
http://code.google.com/chrome/devtools/docs/heap-profiling-dom-leaks.html。
Not sure if I understand the question correctly, but you might want to take a look at the documentation for finding detached DOM tree entries:
http://code.google.com/chrome/devtools/docs/heap-profiling-dom-leaks.html.