Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js window dimensions

// better than using window.innerWidth / window.innerHeight 
// because of scrollbars
const client = {
      width: document.documentElement.clientWidth,
      height: document.documentElement.clientHeight
}
 
PREVIOUS NEXT
Tagged: #js #window #dimensions
ADD COMMENT
Topic
Name
8+3 =