I would like to be able to expand all nodes in Chrome's DOM inspector and get the result in my text editor. How can I do this?

The closest to this I can manage is to view page source, but that shows the original DOM, omitting the modifications made to it via javascript.s

up vote 9 down vote accepted

If you click on a node and press Ctrl+C, you get that node (and all child nodes recursively) copied to the clipboard.

To get everything, simply use this feature on the top-most node (the <html> element. This nodes encompasses nearly everything, the only thing this misses is the <!DOCTYPE> element, which you can copy separately.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.