Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

how to get coordinates of particular word or letter in a text node

29 views
Skip to first unread message

Jacek Pospychala

unread,
Nov 23, 2009, 3:26:13 AM11/23/09
to
hi,

I'm using nsIDOMNSElement.getBoundingClientRect() to get coordinates of
a DOM node. But I'd like to get coordinates of particular word or letter
in a text node.

I guess I could calculate this by myself if I only knew the node's text
line height, letters widths and line wrapping.

Is there any API for that?


thanks

Jacek

Robert O'Callahan

unread,
Nov 24, 2009, 2:44:00 PM11/24/09
to

Range.getBoundingClientRect/getClientRects, available on trunk (not 3.6).

Rob

0 new messages