The VisualViewport interface of the CSSOM view API represents the visual viewport for a given window. For a page containing frames, each , as well as the containing page, will have a unique window object. Each window on a page will have a unique VisualViewport representing the properties associated with that window.
VisualViewport
MDN Reference
The visualViewport read-only property of the Window interface returns a VisualViewport object representing the visual viewport for a given window, or null if current document is not fully active.
visualViewport