given I asynchronously(!!) load several JavaScript files with an asynchronous script loader (that writes a script tag into the document's head that then will download the file), are these scripts evaluated in parallel?
<script>
var script = document.createElement('script');
script.src = "library1.js";
document.getElementsByTagName('head')[0].appendChild(script);
</script>
<!-- Other Markup -->
<script>
var script = document.createElement('script');
script.src = "library2.js";
document.getElementsByTagName('head')[0].appendChild(script);
</script>
<!-- Other Markup -->
<script>
var script = document.createElement('script');
script.src = "library3.js";
document.getElementsByTagName('head')[0].appendChild(script);
</script>
"Normally", when having a standard script tag in the HTML document (body and head!?) the browser will stop/complete all other activites (downloading/page rendering) and only process the single script tag that it encountered. This leads to a "serialized" execution that does not lead to any "race conditions".
But by using the asynchronous loader technique, will the inserted script tag (in the head) also lead (in the end) to a serialized rendering (that when downloaded) only "the current" script will be evaluated or is there the chance that other asynchronously loaded script files will be evaluated in parallel and therefor are prone to race conditions?
Thank you very much!! Tim