John Woodell wrote:
I have an extension that process a selection...
var str = new String(window._content.document.getSelection());

I'd like to be able to just click on the some part of the page,
and collect the text just before and after the click coordinates,
then to something with that text from a right-click menu.

Has anybody figured out a way to do this?

You can use the rangeParent and rangeOffset properties of the event to get the textnode and offset into the text that was clicked on.

/ Neil

_______________________________________________
Project_owners mailing list
[email protected]
http://mozdev.org/mailman/listinfo/project_owners

Reply via email to