Is it the same if you load javascript to the page like this:
<script src="http://domain.net/script.js" type="text/javascript"></script>
and like this
<script type="text/javascript">
document.write("<script src='http://domain.net/script.js' type='text/javascript'></script>");
I have a lot of the dependencies in js and want to configure then in as a separate array, which are just bundled in index.html in the way like:
<script type="text/javascript">
for (i in config.files.javascripts) {
document.write("<script src='config.files.javascripts[i]' type='text/javascript'></script>");
}
</script>
The question is - should it work as expected so that the next file is not executed until the previous one is loaded?
This is there is no server side in the front-end I'm doing and it will also sometimes work as widget though for the dev and test we should load files unmerged and uncompressed to test.
Thanks!