On Friday, September 13, 2013 11:33:49 AM UTC+2, Oliver Krylow wrote:
>
> Are there any plans to support the 'async' and 'defer' attributes of the 
> 'script' tag in 
> ScriptInjector<http://www.gwtproject.org/javadoc/latest/com/google/gwt/core/client/ScriptInjector.html>
>  ?
>

There's no real *reason* to support them.

Script-inserted scripts always run async; the only reason to be able to set 
async (to false) is to enforce execution in insertion order.
As for 'defer', it only affects elements that are "parser inserted", not 
those inserted by scripts, so it's pointless to set it from GWT.

See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script

That said, I'm not aware of any plan to add support for async.

Also, is it true that since the injected script in ScriptInjector is of 
> type 
> 'text/javascript'<https://gwt.googlesource.com/gwt/+/master/user/src/com/google/gwt/core/client/ScriptInjector.java>,
>  browsers will hold the execution of the UI-Thread until that script is 
> loaded because of a potential 'document.write()'?
>

No. Script-inserted scripts are always async.
BTW, the type of the script only affects whether the script will run or 
not, depending on whether or not it's understood by the browser.
 

> If so, is the Code Splitting Feature of Gwt also affected by this, since 
> it uses ScriptInjector internally?
>

N/A 

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to