Call something when the entire page has loaded

PHOTO EMBED

Fri Nov 20 2020 06:06:10 GMT+0000 (UTC)

Saved by @eneki

window.addEventListener('load', (event) => {
    console.log('The page has fully loaded');
});
content_copyCOPY

For the window object, the load event is fired when the whole webpage (HTML) has loaded fully, including all dependent resources such as JavaScript files, CSS files, and images. To handle the load event, you register an event listener using the addEventListener() method:

https://www.javascripttutorial.net/javascript-dom/javascript-onload/