$doc.body.createTextRange

186 views
Skip to first unread message

bhomass

unread,
Feb 23, 2011, 4:37:42 PM2/23/11
to Google Web Toolkit
I know there is a javascript function for
document.body.createTextRange( )

when I try
$doc.body.createTextRange()

in a native method in GWT, it says

body.createTextRange is not a function

why is that?

Armishev, Sergey

unread,
Feb 23, 2011, 5:01:20 PM2/23/11
to google-we...@googlegroups.com
From the top of my head (thanks to GWT , I don't need to remember all
this anymore!)
In IE
document.body.createTextRange()

On all other browsers
document.selection.createRange()

-Sergey

when I try
$doc.body.createTextRange()

why is that?

--
You received this message because you are subscribed to the Google
Groups "Google Web Toolkit" group.
To post to this group, send email to
google-we...@googlegroups.com.
To unsubscribe from this group, send email to
google-web-tool...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.

</PRE><BR><span style='font-size:8.0pt;font-family:"Arial","sans-serif";color:#003366'>
_____________________________________________________<BR>
This electronic message and any files transmitted with it contains<BR>
information from iDirect, which may be privileged, proprietary<BR>
and/or confidential. It is intended solely for the use of the individual<BR>
or entity to whom they are addressed. If you are not the original<BR>
recipient or the person responsible for delivering the email to the<BR> intended recipient, be advised that you have received this email<BR>
in error, and that any use, dissemination, forwarding, printing, or<BR> copying of this email is strictly prohibited. If you received this email<BR>
in error, please delete it and immediately notify the sender.<BR>
_____________________________________________________
</SPAN><PRE>

mP

unread,
Feb 24, 2011, 1:11:27 AM2/24/11
to Google Web Toolkit
Do a search for PPK and "Selection" he has a detailed page aboout how
each system of selections works in IE and all other browsers.
Reply all
Reply to author
Forward
0 new messages