csswizardry / csswizardry/ct

Inline module scripts can usefully have `async`

Open
#3 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
CSS
Stars
1.9k
Forks
50
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at ct.css lines 187-203 and compare the current statement with the linked Jake Archibald article. Update the documentation to distinguish classic scripts from inline module scripts, noting that async is useful for modules while defer remains redundant. Done when the documented behavior matches the examples and cited explanation.

Written by the indexing model from the issue text.

Assessment

Tech stack
html, javascript
Domain
documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.