Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit bef98f7

Browse files
committed
fix
1 parent f1bf4f1 commit bef98f7

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

‎2-ui/5-loading/02-script-async-defer/article.md‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,11 @@ But there are also essential differences between them:
188188
| `defer` | *Document order* (as they go in the document). | Execute after the document is loaded and parsed (they wait if needed), right before `DOMContentLoaded`. |
189189

190190
```warn header="Page without scripts should be usable"
191-
Please note that if you're using `defer`, then the page is visible before the script loads and enables all the graphical components.
191+
Please note that if you're using `defer`, then the page is visible *before* the script loads.
192192
193-
So, buttons should be disabled by CSS or by other means, to let the user
193+
So the user may read the page, but some graphical components are probably not ready yet.
194+
195+
There should be "loading" indication in proper places, not-working buttons disabled, to clearly show the user what's ready and what's not.
196+
```
194197

195198
In practice, `defer` is used for scripts that need the whole DOM and/or their relative execution order is important. And `async` is used for independent scripts, like counters or ads. And their relative execution order does not matter.

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /