If you want to access your document innerHTML, you can use the following

document.all[0].innerHTML

or

document.documentElement.innerHTML if you want to skip the tags <HMTL> tags