I’m writing a Chrome extension where a content script needs to know the dimensions of the screen its window is in. This means the full size of the screen in pixels, not just the “available” area.
In Firefox, I can use a combination of screen.left
, screen.top
, screen.width
, and screen.height
.
However, in Chrome, screen.left
and screen.top
are not available, and instead it only has screen.availLeft
and screen.availTop
. There’s no way that I’m aware of to calculate the screen’s proper left and top coordinates given the information Chrome provides in screen
‘s properties.
Is there any way to do this?