Character offset in an Internet Explorer TextRange

0

As far as I can tell there’s no simple way of retrieving a character offset from a TextRange object in Internet Explorer. The W3C Range object has a node, and the offset into the text within that node. IE seems to just have pixel offsets. There are methods to create, extend and compare ranges, so it would be possible to write an algorithm to calculate the character offset, but I feel I must be missing something.

So, what’s the easiest way to calculate the character offset of the start of an Internet Explorer TextRange?