I have another more straightforward question: why does the script tag that calls onInjectionDone has the defer="defer" attribute, but the module scripts (those defined inside the module.xml) don't. These seems off to me, since the behavior should be the same.
On Oct 28, 10:34 am, Raziel <[email protected]> wrote: > 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 > > >bootstrapthe GWT application, writes ascripttag calling the > > >onInjectionDonefunction at the end of the execution of the selection > > >script. > > > > Given thatscripttags always block evaluation of the page until the > > >scriptis fetched and evaluated, and that document.write will add the > > >scriptright 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 thescriptis 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....... --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
