โญES module

JS โŸฉ module โŸฉ ES module

async scripts

  • async scripts run immediately when ready, independently of other scripts or the HTML document.

  • async has no effect on inline normal scripts. For module scripts, it works on inline scripts as well. (๐Ÿ‘‰๐Ÿป See: tab 2๏ธโƒฃ above)

Cross-Origin Scripts

<!-- another-site.com must supply Access-Control-Allow-Origin -->
<!-- otherwise, the script won't execute -->
<script type="module" src="http://another-site.com/their.js"></script>

Last updated

Was this helpful?