Fix name of JavaScript
This commit is contained in:
parent
3b14ed8185
commit
c5ce5578fc
32 changed files with 61 additions and 61 deletions
|
@ -75,7 +75,7 @@ In the example above, we first see "Library loaded...", and then "DOM ready!" (a
|
|||
|
||||
```warn header="Scripts with `async`, `defer` or `type=\"module\"` don't block DOMContentLoaded"
|
||||
|
||||
Script attributes `async` and `defer`, that we'll cover [a bit later](info:script-async-defer), don't block DOMContentLoaded. [Javascript modules](info:modules) behave like `defer`, they don't block it too.
|
||||
Script attributes `async` and `defer`, that we'll cover [a bit later](info:script-async-defer), don't block DOMContentLoaded. [JavaScript modules](info:modules) behave like `defer`, they don't block it too.
|
||||
|
||||
So here we're talking about "regular" scripts, like `<script>...</script>`, or `<script src="..."></script>`.
|
||||
```
|
||||
|
|
|
@ -129,7 +129,7 @@ Async scripts are great when we integrate an independant third-party script into
|
|||
|
||||
## Dynamic scripts
|
||||
|
||||
We can also create a script dynamically using Javascript:
|
||||
We can also create a script dynamically using JavaScript:
|
||||
|
||||
```js run
|
||||
let script = document.createElement('script');
|
||||
|
|
|
@ -23,7 +23,7 @@ document.head.append(script);
|
|||
...But how to run the function that is declared inside that script? We need to wait until the script loads, and only then we can call it.
|
||||
|
||||
```smart
|
||||
For our own scripts we could use [Javascript modules](info:modules) here, but they are not widely adopted by third-party libraries.
|
||||
For our own scripts we could use [JavaScript modules](info:modules) here, but they are not widely adopted by third-party libraries.
|
||||
```
|
||||
|
||||
### script.onload
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue