Here are two valuable resources worth checking out:
Provided below is a compilation of excerpts from the aforementioned resources (only one dimension is included for each pair):
window.innerWidth
& window.innerHeight
These attributes represent the dimensions of the viewport within the browser window. When retrieving the value of innerWidth
, it must include the width of any rendered scroll bar present.
window.outerWidth
& window.outerHeight
These attributes define the dimensions of the entire browser window, encompassing taskbars and other elements. When accessing the value of outerWidth
, it must reflect the width of the client window. If no client window exists, the attribute must return zero.
window.pageXOffset
& window.pageYOffset
These attributes indicate the number of pixels the page has been scrolled. The pageXOffset
attribute, when retrieved, must provide the x-coordinate relative to the initial containing block origin, specifically the left of the viewport.
window.screenX
& window.screenY
These attributes denote the position of the browser window on the screen. The screenX
attribute, upon retrieval, must offer the x-coordinate relative to the screen's origin of the output device's top of the client window, indicated in pixels or zero if not applicable.
screen.availHeight
& screen.availWidth
Representing the available width and height on the screen, excluding OS taskbars and similar elements, these attributes are vital for layout consideration. The availWidth
attribute, when accessed, must provide the available width of the output device's rendering surface.
screen.height
& screen.width
These attributes represent the width and height of the screen. The width
attribute, upon retrieval, must supply the width of the output device.
<element>.clientLeft
& <element>.clientTop
Referring to the position of the upper left corner of the content field concerning the entire element, including borders, these attributes offer essential insights. Upon retrieval, the clientTop
attribute returns the computed value of the border-top-width
property in addition to the scrollbar width between the top padding edge and the top border edge.
<element>.clientWidth
& <element>.clientHeight
Providing the width and height of the content field while excluding borders and scrollbars, these attributes offer critical measurements for design. When retrieved, the clientWidth
attribute should return the viewport width while excluding the scroll bar's size if the element is the root element, and the padding edge's width, excluding the scrollbar's width between the padding and border edges, otherwise.
<element>.offsetLeft
& <element>.offsetTop
These attributes represent the left and top positions of the element concerning its offsetParent. The offsetTop
attribute, when applied to element A, must determine the value using a specific algorithm to calculate and provide accurate positioning details.
<element>.offsetWidth
& <element>.offsetHeight
Representing the width and height of the entire element, including borders, these attributes are valuable for layout and styling purposes. The offsetWidth
attribute, when accessed on element A, should return the border edge width of the element.
<element>.scrollLeft
& <element>.scrollTop
Providing information on the amount of pixels the element has been scrolled, these attributes are crucial for dynamic content interactions. When invoked on element A, the scrollTop
attribute should return the y-coordinate of the content at the alignment point with the top of the content edge of A.
<element>.scrollWidth
& <element>.scrollHeight
Representing the width and height of the entire content field, these attributes include hidden parts to enable precise visualization. The scrollWidth
attribute, when accessed on element A, should return the computed value based on specific criteria to determine the content's width and padding properties.