Skip to main content


Why you should use document.readyState


I asked several web devs what happens if an onload handler adds another onload handler. Does the second onload handler execute? The onload event has already fired, so it might be too late for the second onload to get triggered. On the other hand, the onload phase isn’t over (we’re between loadEventStart and loadEventEnd in Navigation Timing ter...