On 29 oct, 19:38, Raziel <[email protected]> wrote:
> 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.

I think that, as the comment says, onInjectionDone would execute
*immediately*, i.e. even before other (injected) scripts have finished
loading (because other scripts are all external scripts that need be
downloaded). With the defer attribute, it "tells" IE to wait for other
the scripts (well, if we consider that executing the script
immediately is a bug in IE, the defer attribute makes it actually
document.write() the script without executing it; and then because it
appears in the "source" after the other scripts, it is executed once
they've loaded; so in effect it really is a hack and not a
"legitimate" use of <script defer>).

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