Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion selecting all text
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Neil  
View profile  
 More options Oct 11 2012, 5:04 am
Newsgroups: mozilla.dev.extensions
From: Neil <n...@parkwaycc.co.uk>
Date: Thu, 11 Oct 2012 10:04:44 +0100
Local: Thurs, Oct 11 2012 5:04 am
Subject: Re: selecting all text

Tom wrote:
>Is there a way to select the readable/viewable text only?

Have you tried selObj.toString() ?

>var contentDoc = gBrowser.selectedBrowser.contentDocument;
>contentDoc.getSelection().selectAllChildren(contentDoc);
>var win = gBrowser.getBrowserForDocument(contentDoc).contentWindow;
>var selObj = win.getSelection();

Note that (these days, at least) contentDoc.getSelection() is the same
as contentWindow.getSelection().

--
Warning: May contain traces of nuts.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.