I want to run a function when the page is loaded, but I don’t want to use it in the tag.
I have a script that runs if I initialise it in th
Try readystatechange
document.addEventListener('readystatechange', () => {
if (document.readyState == 'complete') codeAddress();
});
where states are:
DOMContentLoaded
window.onload