W3C home > Mailing lists > Public > whatwg@whatwg.org > February 2009

[whatwg] defer on style, depends

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Mon, 09 Feb 2009 11:23:45 -0500
Message-ID: <49905891.3080802@mit.edu>
Ian Hickson wrote:
> I'm not convinced either of these are really great solutions. I think it'd 
> be better just to have the script itself only block when it hits 
> CSS-dependent APIs (though I recognise that that is a much harder problem 
> in most rendering engines today).

I'm not sure how you envision this working.  The run-to-completion 
semantics mean that while the script is working on the API call to 
return (which means that network events are being processed, etc), the 
following invariants need to be maintained (list very much not exhaustive):

1)  No setTimeout timers fire.
2)  No XMLHttpRequest state changes happen.
3)  No image load events fire.
4)  No stylesheet load events fire (for UAs that implement such an
     event on their <link> elements, as Gecko would like to do).
5)  No user interaction with the page or other pages that can reach the
     given page is allowed.

#5 makes it unlikely that a UA would want to go this route at all.  #4 
means that this approach would be incompatible with reasonable style 
load events...  #1, #2, #3 all mean that networking needs to 
differentiate between the set of stylesheets we're waiting on and 
everything else.

-Boris
Received on Monday, 9 February 2009 08:23:45 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:09 UTC