getBoundingClientRect

open external fun getBoundingClientRect(): DOMRect(source)

The Element.getBoundingClientRect() method returns a DOMRect object providing information about the size of an element and its position relative to the viewport.

MDN Reference