window.onload
event is used by programmers to start their web application. It can be something quite simple, for example, a drop-down menu, and maybe quite complicated, as an example, launching an email application. The essence of the problem lies in the fact that the onload
triggered only after the entire page is loaded (including all the images and other binary content). If there are a lot of pictures on the page, then you can notice some delay between the page loading and the moment when it starts to actually work. In fact, we only need to find out how to determine when the DOM is fully loaded, and not to wait for the loading of images.Source: https://habr.com/ru/post/31230/
All Articles