The element for which to calculate scroll boundary stats.
OptionalelementBoundingClientRect: Pick<DOMRect, "top" | "right" | "bottom" | "left">The bounding client rect for the element. Useful if the bounding is needed elsewhere to avoid recalculating.
Calculates distances and percentages (relative to size) of those distances to each scrolling boundary (one for each cardinal direction).