how to get fully computed HTML (instead of source HTML)?
The Web Developer Toolbar for Firefox has a "View Generated Source" option which provides this functionality.
With Firebug's HTML tab, you can right click on the <html>
element, and click "Copy HTML".
You can do the same thing with Developer Tools in Chrome/Safari.
with (window.open("")) {
document.open("text/html");
document.write("<!--\n"); //for live version delete this line
document.write(opener.document.documentElement.outerHTML.replace(/</g,"<").replace(/>/g, ">"));
document.write("\n//-->"); //for live version delete this line
document.close();
document.title = "DOM Snapshot:" + opener.document.title;
focus();
}
- Open console
- copy paste the above code and execute
- it opens an empty page,
- now inspect the page with right click or f12,
- copy outerhtml of the comment
- paste wherever you want
- optionally remove the comment at the start and end
If you want a live version that is clickable, then simple leave out the comment tags in the above code.