How do I get the HTML source from the page?

Use

document.documentElement.outerHTML

or

document.documentElement.innerHTML

Leave a Comment