minor
This commit is contained in:
parent
8b545206a4
commit
8734416b97
1 changed files with 2 additions and 2 deletions
|
@ -274,9 +274,9 @@ When using modules, we should be aware that HTML-page shows up as it loads, and
|
||||||
|
|
||||||
For non-module scripts, `async` attribute only works on external scripts. Async scripts run immediately when ready, independently of other scripts or the HTML document.
|
For non-module scripts, `async` attribute only works on external scripts. Async scripts run immediately when ready, independently of other scripts or the HTML document.
|
||||||
|
|
||||||
For module scripts, it works on any script.
|
For module scripts, it works on inline scripts as well.
|
||||||
|
|
||||||
For example, the script below has `async`, so it doesn't wait for anyone.
|
For example, the inline script below has `async`, so it doesn't wait for anything.
|
||||||
|
|
||||||
It performs the import (fetches `./analytics.js`) and runs when ready, even if the HTML document is not finished yet, or if other scripts are still pending.
|
It performs the import (fetches `./analytics.js`) and runs when ready, even if the HTML document is not finished yet, or if other scripts are still pending.
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue