Is there an equivalent to getBoundingClientRect() for text nodes?

Viewed 9074

Is there a way to get the bounding rect of a text node?

The getBoundingClientRect() method is defined on elements only, and the parent element is bigger then the actual text node.

2 Answers
Related