I want to dump the current DOM to a file and be able to view it offline. Essentially, I have an outdated version of a page that I would like to keep around for comparison. A
In Chrome Dev Tools Console, type document.documentElement.outerHTML
(use the tab button for autocomplete to save keystrokes) and hit Enter to see the DOM text displayed. To copy it to your clipboard and paste it elsewhere, use copy(document.documentElement.outerHTML)
instead.
Damon's answer is also good (in Dev Tools, click Elements, right click , click Copy > Copy outerHTML), but I find the Console command easier.