I have following line in my html:
<script type = "module" src = "./src/main.js"></script>
the lines:
var loadJS = function (data) { if (data) { var script = document.createElement('script'); script.innerHTML = data; document.body.appendChild(script); } };
import my main.js without the type set on module. Why the type of script is ignored?
I have following line in my html:
<script type = "module" src = "./src/main.js"></script>
the lines:
var loadJS = function (data) { if (data) { var script = document.createElement('script'); script.innerHTML = data; document.body.appendChild(script); } };
import my main.js without the type set on module. Why the type of script is ignored?