For nearly a decade i've been using:
document.body.scrollHeight
to return the "ideal" height of the browser window. This worked fine when i was forcing Internet Explorer into quirks mode, by using a quirks-mode doctype:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
Now i want to opt into standards mode, except the meaning of scrollHeight
has changed:
document.body.scrollHeight
= the height of the documentdocument.body.scrollHeight
= the height of the <body>
elementWhat is the standards mode equivalent of document.body.scrollHeight
?
document.documentElement.scrollHeight
I believe.
For viewport it's window.innerHeight
for modern browsers.
If the above aren't what you want, here's a list of a bunch of them: