On 27 oct, 23:44, Raziel <raziel...@gmail.com> wrote:
> IFrameTemplate.js, the javascript template containing the logic to
> bootstrap the GWT application, writes a script tag calling the
> onInjectionDone function 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 why onInjectionDone is 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 call onInjectionDone
> 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.7/dev/core/src/com/google/gwt/core/linker/IFrameTemplate.js#427
http://code.google.com/p/google-web-toolkit/source/browse/trunk/dev/core/src/com/google/gwt/core/linker/IFrameTemplate.js#441
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to