W dniu poniedziałek, 18 czerwca 2012 17:27:08 UTC+2 użytkownik C Anthony 
Risinger napisał:
>
> On Mon, Jun 18, 2012 at 5:45 AM, Maho <[email protected]> wrote: 
> [...]
> > Am I wrong? I think not - I'm facing similar problem, and yesterday I 
> tried 
> > to do something similar (well, opposite, access HTML objects from 
> pyjamas 
> > code). And I had to do 
> > 
> >     from __javascript__ import window 
> > 
> > .... 
> >     window.parent.XXXX (where XXX is javascript identifier in main 
> document 
> > code). 
>
> what you're looking for is: 
>
> from __pyjamas__ import doc, wnd 
>
> ... doc and wnd (or $doc and $wnd in javascript) are references to the 
> main frame, NOT the application frame.  
>

Doesn't work. 

When I did as you said (from __pyjamas__ import wnd ) it raised exception, 
that wnd is not defined when I tried to do 

wnd.pyjs_dispatcher = MyObject()

But such code:

from __javascript__ import window
window.parent.pyjs_dispatcher = MyObject() 

works. 

-- 



Reply via email to