[Project_owners] getSelection() length

Michael Bar-David mbd1987 at gmail.com
Tue Mar 28 13:43:17 EST 2006


thanks guys

On 3/28/06, Soyapi Mumba <soyapim at gmail.com> wrote:
>
> Michael Bar-David wrote:
> > Sfter some searches, I understood that instead of using
> > document.getSelection() in an extension, I should use
> > window.content.getSelection(). But, I need to know it's length - and
> > this JS code of the extension:
> > var word = window.content.getSelection();
>
> this should be:
>
>         var word = window.content.getSelection().toString();
>
>
> > alert(word.length);
> >
> > alerted "undefined"
> >
> > how can I get the selection's length ?
>
> - Soyapi
> --
> Soyapi Mumba
> http://soyapi.blogspot.com
> http://searchwith.mozdev.org
> _______________________________________________
> Project_owners mailing list
> Project_owners at mozdev.org
> http://mozdev.org/mailman/listinfo/project_owners
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mozdev.org/pipermail/project_owners/attachments/20060328/5f650829/attachment.htm


More information about the Project_owners mailing list