Get the html of the javascript-rendered page (after interacting with it)

html, javascript, save, state

Solution

That should do and will grab the ALL page not just the body

console.log(document.getElementsByTagName('html')[0].innerHTML);

Problem

I would like to be able to save the state of the html page after I've interacted with it. Say I click a checkbox, or the javascript set the values of various elements. How can I save the "javascript-rendered" page? Thanks.

Original source