window.innerWidth and window.innerHeight evaluate to the width and height of the viewport.
If scrollbars are present, the drawable area of the viewport is slightly smaller than that which is indicated by innerWidth and innerHeight.
The returned amount of pixel does not represent physical pixels on the screen, but the amount of visible pixels that takes into account the current zoom-in or zoom-out factor. Thus, window.innerWidth can be larger than window.outerWidth if the content is zoomed in.