Friday, September 13, 2013

Re: ScriptInjector async /defer



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 ?

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.


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' , 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 google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate