views:

52

answers:

1

Sniffing gmail's Print all link source code, there's something like this:

<script>
function Print(){document.body.offsetHeight;window.print()};
</script>
</head>
<body onload="Print()">

What does document.body.offsetHeight do?

+2  A: 

It forces WebKit based browsers to load the complete set of content before printing (including images, styles, etc.)

Justin Niessner
Thank you Justin!
systempuntoout