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

On 1/13/12 2:50 AM, Roman Rudenko wrote:
> True. In its current form, beforeload is not very useful for partial processing.
> What if we had 'beforedownload' event specifically for resource
> fetching, and constructed stub elements to feed it as event.target
> when load is readahead-induced?

That still has the fundamental problem of serializing subresource 
processing on the "main" JS thread that page JS is running on.  I 
believe that as hardware becomes more parallel and browsers strive to 
make use of that parallelism having such a requirement in a 
specification will be actively harmful.

Maybe the benefits outweigh the harm, but they'd have to be some pretty 
serious real benefits, not just hypothetical ones, if they're going to 
constrain the web platform in a major way like that.  Hence me trying to 
understand the actual use cases here.

So, do we expect to need to block loads from _part_ of a document, in 
the long term?

-Boris

Received on Friday, 13 January 2012 08:23:12 UTC