Merge pull request #527 from petekeller2/master

Update sentence in DOMContentLoaded and scripts
This commit is contained in:
Ilya Kantor 2018-10-01 00:54:10 +03:00 committed by GitHub
commit 880659f3c1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -53,7 +53,7 @@ When the browser initially loads HTML and comes across a `<script>...</script>`
External scripts (with `src`) also put DOM building to pause while the script is loading and executing. So `DOMContentLoaded` waits for external scripts as well.
The only exception are external scripts with `async` and `defer` attributes. They tell the browser to continue processing without waiting for the scripts. So the user can see the page before scripts finish loading, good for performance.
The only exception are external scripts with `async` and `defer` attributes. They tell the browser to continue processing without waiting for the scripts. This lets the user see the page before scripts finish loading, which is good for performance.
```smart header="A word about `async` and `defer`"
Attributes `async` and `defer` work only for external scripts. They are ignored if there's no `src`.