HTML from a JavaScript rendered page

Snippet

Saving a page source with javascript rendered elements means you get the script tags, but not the rendered page.

Barring a browser plugin, this'll do.

/* display in console */
console.log(document.getElementsByTagName('html')[0].innerHTML);
 
/* or copy to the clipboard */
copy(document.body.innerHTML);

Add new comment

Plain text

  • No HTML tags allowed.
  • Lines and paragraphs break automatically.