scrollY
scrollY is a property of the Window interface in web browsers that indicates the vertical scroll offset of the document in CSS pixels. It represents how far the document's content has been scrolled from the top of the initial viewport.
The value is read-only and updates as the user scrolls or as scripts programmatically adjust the scroll
It is expressed in CSS pixels and is affected by the page's zoom level. DevicePixelRatio does not
Usage: Read window.scrollY to determine how far the user has scrolled, which can drive UI behavior such
Compatibility: scrollY is widely supported in modern browsers. It is a standard part of the CSSOM View
See also window.scrollTo, window.scrollBy, pageYOffset, and the CSSOM View Module.