load function code example
Example 1: load js
// The same, but using the onload event handler property:
window.onload = (event) => {
console.log('page is fully loaded');
};
Example 2: load js
window.addEventListener('load', (event) => {
console.log('page is fully loaded');
});