Is it possible to get the offset of a character/set of characters relative to the root, i.e. within the entire document? It appears that it is possible to get the offset of a character within its node. It is also possible to count brute-force the length of all text nodes before a point and thereby determine its offset in the document. However, I'd like to know if it is already possible to get the document-based offset of a position within the DOM, before trying to implement the brute-force approach mentioned above.
Thanks, Vishy.
