Hi,

Seems there is something strange going on with search - I answered
your question and can't see the reply either!

The $ before doc is due to GWT loading into an IFrame - GWT ensures
that $doc points to the window's document object (you can read more on
that in the JSNI documentation from GWT home page).

You don't mention which operating system you use, but I believe
document.selection.createRange() only works on IE and not other
browsers, so I guess yuo are developing on Windows, which uses IE as
hosted mode browser and then testing on other browsers in web mode.
Just do a google search for cross-browser
document.selection.createRange() to see how you would do it for Opera,
Safari, Chrom, Firefox etc.

//Adam


On 4 Juni, 02:05, bhomass <bhom...@gmail.com> wrote:
> I have a native method which uses
> $doc.selection.createRange()
>
> I am not sure why the $ before doc. I simply copied it from some
> sample code. this method works find when in hosted mode. but after
> compile and called directly from a browser I get the $doc.selection is
> undefined error.
>
> any one knows what's wrong with this?
>
> sorry if this is second posting. I posted this question a few days
> ago, but it does not come up in search.
--~--~---------~--~----~------------~-------~--~----~
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-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to