types pf listeners on window onload listener code example
Example: document.addEventListener("load", function () {
window.addEventListener('load', (event) => {
console.log('page is fully loaded');
});
window.onload = (event) => {
console.log('page is fully loaded');
};