Last active
March 30, 2016 12:29
-
-
Save droid001/06fc9b28c92ef8fdea544bea93c5c047 to your computer and use it in GitHub Desktop.
document/body height
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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