Is there a way to access the page HTML source code using javascript?
I know that I can use document.body.innerHTML
but it contains only the code inside the body. I want to get all the page source code including head and body tags with their content, and, if it's possible, also the html tag and the doctype.
Is it possible?