Try

private native void publish(MyWidget widget) /*-{
       $doc.myFunction =
[email protected]::myMethod()();
 }-*/;

Then within the actual page, document.myFunction()


On Sat, May 23, 2009 at 1:43 PM, BR <[email protected]> wrote:

>
> For a reasons too long to explain here, my app is currently getting
> deployed in an iframe. I need to use JSNI to set up a JavaScript
> callback into my application. Both the iframe and the enclosing doc
> are loaded from the the same docbase, so there should be no security
> issues.
>
>
>    private native void publish(MyWidget widget) /*-{
>        $wnd.<insert-the-right-thing-here>.myFunction =
> [email protected]::myMethod()();
>  }-*/;
>
> I am wondering what should go in <insert-the-right-thing-here>. I
> tried parent, parent.window - but I am no JS expert.
>
> Thanks in advance!
> BR
> >
>

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to