getBoundingClientRect method

DOMRect getBoundingClientRect()

The Range.getBoundingClientRect() method returns a DOMRect object that bounds the contents of the range; this is a rectangle enclosing the union of the bounding rectangles for all the elements in the range.

This method is useful for determining the viewport coordinates of the cursor or selection inside a text box. See Element.getBoundingClientRect for details on the returned value.

Implementation

external DOMRect getBoundingClientRect();