Chrome Dev Tools export Elements HTML

耗尽温柔 提交于 2019-12-07 04:38:00

问题


To debug my chromium-embedded application I am looking for a function to get the source code of the web page from withing the chrome developer tools. I basically want the HTML tree shown in the 'Elements' tab, the actual HTML DOM, as HTML text. Does this functionality exist? How can I use it?

As I use CEF I do only have the chrome dev tools available and not the full browser. I cannot use the right-click context menu because I want to see the current manipulated DOM and not the original source.

I want to use this functionality for debugging purpose so that I can diff two different HTML trees.


回答1:


Select the top node and choose "Copy". You'll have to re-add the Doctype, though.

Alternatively, you could click on "edit as HTML" and copy it from there.




回答2:


You can try the following:

All you have to do is right click the element and copy the outerHTML.



来源:https://stackoverflow.com/questions/28151446/chrome-dev-tools-export-elements-html

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!