Skip to content

Instantly share code, notes, and snippets.

@droid001
Last active March 30, 2016 12:29
Show Gist options
  • Save droid001/06fc9b28c92ef8fdea544bea93c5c047 to your computer and use it in GitHub Desktop.
Save droid001/06fc9b28c92ef8fdea544bea93c5c047 to your computer and use it in GitHub Desktop.
document/body height
const documentHeight = function() {
var body = document.body,
html = document.documentElement,
height = Math.max( body.scrollHeight, body.offsetHeight, html.clientHeight, html.scrollHeight, html.offsetHeight )
;
return height;
}
export default documentHeight;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment