leftEdgeDistance(element: Element, relativeTo?: 'document' | Element, rect?: DOMRect)

Fetches the distance of the left of the element passed to the function from the top of the viewport.

If `relativeTo` is passed `document`, it will use the distance from the top of the document.

If you pass any Element to `relativeTo`, it will return the distance between the left of `element` and the left of `relativeTo`.

Test

CSS Properties

leftEdgeDistance() =>
© 2022
🐞