I need to make a comment mechanism in which user highlights a piece of text, clicks "comment this", and then does something. The Javascript code has to know not only the selected text (this is trivial), but also the anchorOffset, to know exactly from which to which character the text was selected.
I've found a cross-browser solution that gives you the text. Is there a reliable way to get a selection object as it's described in DOM specs?