window.addEventListener('load', (event) => { console.log('page is fully loaded'); }); window.onload = (event) => { console.log('page is fully loaded'); };