[whatwg] should we add beforeload/afterload events to the web platform?

On 1/12/12 9:22 AM, Boris Zbarsky wrote:
> On 1/12/12 5:16 AM, Simon Pieters wrote:
>> Note that it
>> removes the root element when the script element is executed, not at
>> DOMContentLoaded.
>
> Ah, I missed that. I guess the HTML5 parsing algorithm means that now
> the elements are parsed into the other document, eh? That's actually
> pretty cute. I wonder whether we can get the mobify folks to switch to
> this....

Thinking back on this, this still has the issue of not preventing preloads.

Again, preventing preloads on a per-load basis is a hard problem if you 
want to have sane parallelism.  Preventing _all_ loads for a document 
based on some declarative thing near the start of the document, on the 
other hand, should not be too bad.  If that plus a beforeprocess event 
addresses the majority of the web-facing use cases, we should consider 
adding that.

-Boris

Received on Sunday, 15 January 2012 13:23:50 UTC