Answer the question
In order to leave comments, you need to log in
Why different ViewPort sizes in Chrome and Firefox?
I'm trying to take a screenshot in Goole Chrome via the Chrome.Tab API - captureVisibleTab.
I look at the parameters of the visible part of the image
>screen
Screen {availWidth: 1438, availHeight: 1150, width: 1436, height: 1149, colorDepth: 24, …}
availHeight: 1150
availLeft: 1437
availTop: 0
availWidth: 1438
colorDepth: 24
height: 1149
orientation: ScreenOrientation {angle: 0, type: 'landscape-primary', onchange: null}
pixelDepth: 24
width: 1436
: Screen
>screen
Screen { availWidth: 1280, availHeight: 1024, width: 1280, height: 1024, colorDepth: 24, pixelDepth: 24, top: 0, left: 0, availTop: 0, availLeft: 0 }
Answer the question
In order to leave comments, you need to log in
availHeight is css pixels , which are indirectly related to real ones. Try zooming in the developer console and sipping the screen border while changing the resolution. There will also not be real numbers)
but about .documentElement.clientHeight
documentation on MDN
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question