How can I get all the page HTML as String, including the iframe's inside the body?
I tried following,
document.getElementsByTagName('html')[0].innerHTML
But the iframe's HTML is not returned.
How can I get all the page HTML as String, including the iframe's inside the body?
I tried following,
document.getElementsByTagName('html')[0].innerHTML
But the iframe's HTML is not returned.
You can get iframe's innerHTML with the window.frames
object:
window.frames['some-iframe'].document.body.innerHTML
Good luck!