What is the difference between document.documentElement.clientHeight and document.body.clientHeight? Are the return values consistent across all we
document.documentElement.clientHeight
document.body.clientHeight
Let's ask good old firebug (for the sake of being lazy, I did it right here on SO) for the different between those two objects:
>>> document.documentElement >>> document.body
So, document.documentElement points to the top-level element while document.body points to the element.
document.documentElement
document.body