Oh that makes now a lot of sense. I completely missed that part (even though it's a few lines above what I was looking at).
I guess I'll have to change that code in the linker as well to not use document.write but some other way to control the execution of injected scripts. Has anybody had this issue (loading the host page and thus the GWT app) in an XMLHttpRequest, and found a nicer solution to deal with the document.write? On Oct 27, 7:13 pm, Thomas Broyer <[email protected]> wrote: > On 27 oct, 23:44, Raziel <[email protected]> wrote: > > > > > > > IFrameTemplate.js, the javascript template containing the logic to > > bootstrap the GWT application, writes a script tag calling the > >onInjectionDonefunction at the end of the execution of the selection > > script. > > > Given that script tags always block evaluation of the page until the > > script is fetched and evaluated, and that document.write will add the > > script right there at the state the document is at the moment of the > > call, I don't understand whyonInjectionDoneis not called directly > > instead. > > > My specific problem is that I'm loading my GWT application through an > > XMLHttpRequest, and at the moment the script is executed the document > > is already "loaded", thus calling document.write wipes out everything. > > I'm planning to modify such logic, and probably callonInjectionDone > > directly. But this code is there for a reason and I'd like to know why > > before I make any change. > > AFAICT, that's to be sure it is called after injected scripts (when > you use a <script/> in your gwt.xml) have been injected (and been > downloaded):http://code.google.com/p/google-web-toolkit/source/browse/releases/1....http://code.google.com/p/google-web-toolkit/source/browse/trunk/dev/c... --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
