The readystatechange event has a state named “interactive”, which sounds like that the browser is blocking interactive events beforehand. Is that standardized somewhere? What are the details?
I mean, if the browser would not defer/postpone or block those events, then there would always be a race condition with Javascript attaching event handlers, unless Javascript is mixed with HTML (either with attributes like onclick or Javascript generates the whole element itself).
Example: A browser loading a huge page might already render parts of the DOM visible to the user (subject to changes, of course) without having even finished downloading the HTML. What if the user clicks something? Will that event be ignored, delivered now or executed later? I hope it will deliver later with the event object being generated and routed at the time of unblocking, not at the click time.—Ignoring is fine, too.