How to know if a page is loaded (Ie my script was loaded after the onload event)
Posted on 2008-11-10
I provide a script that has to start when the DOM is ready (OnLoad or OnDOMContentLoaded), but it is only executed in 3rd party webpages, so i don't know where it was put in the page or if it was even loaded by another js.
So I use an EventListener for OnLoad/OnDOMContentLoaded, but how do I know, if OnLoad has already triggered?
In Browsers which support document.readyState this is not a problem, but what about the others?
Thx in advance