Fixed typo in DOMContentLoaded paragraph

This commit is contained in:
Orkhan Huseynli 2018-08-23 22:48:31 +04:00 committed by GitHub
parent 62226efedc
commit 937d819cdb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -43,7 +43,7 @@ For instance:
<img id="img" src="https://en.js.cx/clipart/train.gif?speed=1&cache=0"> <img id="img" src="https://en.js.cx/clipart/train.gif?speed=1&cache=0">
``` ```
In the example the `DOMContentLoaded` handler runs when the document is loaded, not waits for the page load. So `alert` shows zero sizes. In the example the `DOMContentLoaded` handler runs when the document is loaded and does not wait for the image to load. So `alert` shows zero sizes.
At the first sight `DOMContentLoaded` event is very simple. The DOM tree is ready -- here's the event. But there are few peculiarities. At the first sight `DOMContentLoaded` event is very simple. The DOM tree is ready -- here's the event. But there are few peculiarities.