ct
ct copied to clipboard
Inline module scripts can usefully have `async`
https://github.com/csswizardry/ct/blob/1f0a063ceb7eb4dc8f0990d9ff40fb56f7d65006/ct.css#L187-L203
Async and defer simply do not work on inline scripts. It won’t do any harm, but it’s useful to know about.
This is true for classic scripts, but type=module inline scripts can usefully have async applied:
<script type=module>
// I run like `defer`!
</script>
<script type=module async>
// I run as soon as encountered but non-blocking!
</script>
defer is still useless, as it is redundant.