I have a question about order of execution for mixed script type.
Here is my code :
<script>
if(document.documentMode) {
const firstScriptInDOM = document.getElementsByTagName('script')[0];
const polyfill = document.createElement('script');
polyfill.src = "/static/js/polyfills/polyfills.js";
firstScriptInDOM.parentNode.insertBefore(polyfill, firstScriptInDOM);
}
</script>
<script src="static/js/lib1.js" defer></script>
<script src="static/js/lib2.js" defer></script>
<script src="static/js/lib3.js" defer></script>
<script src="static/js/myOwnScriptFile.js" defer></script>
The first script tag's purpose is to load polyfills for IE if the browser is IE. Then it should load this other scripts and execute my code.
My question is : Will the polyfills script block execution of the defered scripts ?
Thanks a lot for you time !