minor fixes

This commit is contained in:
Ilya Kantor 2021-07-23 10:10:17 +03:00
parent 823eea4dae
commit 2957e71a05
2 changed files with 3 additions and 3 deletions

View file

@ -2,7 +2,7 @@
The lifecycle of an HTML page has three important events:
- `DOMContentLoaded` -- the browser fully loaded HTML, and the DOM tree is built, but external resources like pictures `<img>` and stylesheets may not yet have loaded.
- `DOMContentLoaded` -- the browser fully loaded HTML, and the DOM tree is built, but external resources like pictures `<img>` and stylesheets may not yet have loaded.
- `load` -- not only HTML is loaded, but also all the external resources: images, styles etc.
- `beforeunload/unload` -- the user is leaving the page.
@ -114,7 +114,7 @@ The example below correctly shows image sizes, because `window.onload` waits for
```html run height=200 refresh
<script>
window.onload = function() { // same as window.addEventListener('load', (event) => {
window.onload = function() {
alert('Page loaded');
// image is loaded at this time