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 a68022a

Browse files
committed
minor
1 parent 0cfe9f5 commit a68022a

File tree

1 file changed

+2
-2
lines changed
  • 2-ui/3-event-details/10-onload-ondomcontentloaded

1 file changed

+2
-2
lines changed

‎2-ui/3-event-details/10-onload-ondomcontentloaded/article.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,9 @@ There are two differences between them.
6767
| | `async` | `defer` |
6868
|---------|---------|---------|
6969
| Order | Scripts with `async` execute *in the load-first order*. Their document order doesn't matter -- which loads first runs first. | Scripts with `defer` always execute *in the document order* (as they go in the document). |
70-
| `DOMContentLoaded` | Scripts with `async` may load and execute *before `DOMContentLoaded`*: if they are small, and the document is big, they load faster. | Scripts with `defer` always execute *after `DOMContentLoaded`*: they wait for it if needed. |
70+
| `DOMContentLoaded` | Scripts with `async` may load and execute while the document has not yet been fully downloaded. | Scripts with `defer` execute after the document is loaded and parsed (they wait if needed), right before `DOMContentLoaded`. |
7171

72-
So `async` is used for totally independent scripts, and `defer` is used where we want some order.
72+
So `async` is used for totally independent scripts.
7373

7474
```
7575

0 commit comments

Comments
(0)

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