Thanks guys, this is where I'm confused - I'm creating a 3rd party js
object, which internally creates the DOMParser:
private native void test() /*-{
// inside the 'constructor' of 'thirdPartyObject' is where
"new DOMParser" gets called.
var x = new $wnd.thirdPartyObject();
}-*/;
so does that mean that you can't use any external javascript libraries
which create new (non-primitive) objects internally (that would be
like all of them?). I bet that:
new $wnd.DOMParser()
would work in my native function example, but I can't do anything like
that since it's being created internally in that third party code.
Thanks
On Nov 17, 12:03 pm, Jason Essington <[EMAIL PROTECTED]>
wrote:
> once you step into JSNI, you are in the javascript world, accessing
> java objects is a bit more complicated than in non-JSNI methods.
>
> http://code.google.com/docreader/#p=google-web-toolkit-
> doc-1-5&s=google-web-toolkit-doc-1-5&t=DevGuideJavaFromJavaScript
>
> -jason
> On Nov 17, 2008, at 9:29 AM, markww wrote:
>
>
>
> > Hi,
>
> > I'm wrapping some native javascript code which calls:
>
> > var x = new DOMParser();
>
> > This call results in an exception being thrown, stating that DOMParser
> > cannot be found. I'm testing it like:
>
> > private native void test() /*-{
> > var x = new DOMParser();
> > }-*/;
>
> > I don't know much about javascript, does DOMParser require a specific
> > include to resolve itself?
>
> > Thanks
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---