[whatwg] API to delay the document load event

David Bruant bruant.d at gmail.com
Sun Apr 28 15:39:16 PDT 2013


Le 29/04/2013 00:14, Robert O'Callahan a écrit :
> We don't want to require people to do everything in Caja just to 
> support composition of independent scripts.
There are certainly more lightweight solutions than Caja to achieve the 
same thing.

> AFAICT we generally try to design Web APIs to support composition of 
> independent scripts whenever that is easy to do.
If your scripts are that independent, how do you know if one forgets to 
call document.stopDelayingLoadEvent()? This is a footgun. This is also 
additional surface for web browsers to mess up which they already have 
enough to deal with.
Give one way to signal that the application is ready. Devs will figure 
out the rest. One way to signal that the application is ready will serve 
at least 80% (maybe 90%) of the needs anyway.

In this context, trying to support composition of independent scripts is 
most likely over-engineering. Will ads care to call 
document.delayLoadEvent()? Will social widgets do that? Where is the 
concrete need for independent script composition? Are the rare use cases 
really worth the additional complexity?

David


More information about the whatwg mailing list