I am unable to find an explicit reference for the use of these functions: getBBox() vs getBoundingClientRect() vs getClientRects().
getBBox()
getBoundingClientRect()
getClientRects()
some elements(like span tag) will have multiple ClientRects when they are wrapped into multiple lines.MDN Element.getClientRects() and a BoundingRect is the union of ClientRects of a element.MDN Element.getBoundingClientRect()
span