What does document.body.offsetHeight do before window.print ()?

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

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

What does document.body.offsetHeight do?

+6
javascript gmail
source share
1 answer

It forces WebKit-based browsers to download a full set of content before printing (including images, styles, etc.).

+7
source share

All Articles