Created
August 23, 2016 18:41
-
-
Save brizandrew/3952ae3a33588ea1843621cf8c0af613 to your computer and use it in GitHub Desktop.
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
/* | |
Code snippet for vanilla cross-browser height and width gathering | |
*/ | |
function getPageSize() { | |
return { | |
height: Math.max(document.documentElement.clientHeight, window.innerHeight || 0), | |
width: Math.max(document.documentElement.clientWidth, window.innerWidth || 0) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment