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

[whatwg] Link.onload; defer on style, depends

From: Sean Hogan <shogun70@westnet.com.au>
Date: Wed, 25 Mar 2009 21:31:32 +1100
Message-ID: <49CA0804.6040709@westnet.com.au>
Ian Hickson wrote:
> On Sun, 15 Mar 2009, Boris Zbarsky wrote:
>> Sean Hogan wrote:
>>>> This is a request for the link element to be given an onload 
>>>> attribute.
>>> And presumably a readyState property.
>> At least in Gecko, you can already detect whether the sheet is done 
>> loading: if you try to get its cssRules and that throws 
>> INVALID_ACCESS_ERR, then it's still loading.  (If it throws 
>> DOM_SECURITY_ERR then you're not allowed to read the style data; that's 
>> why you have to check for the exact type of exception thrown.  Though 
>> really, if you're loading style sheets cross-site you're in for a world 
>> of hurt unless you control both sites.)
> I haven't added readyState at this time. I am concerned about feature 
> creep here.

As for link.onload, link.readyState is implemented in IE since IE6. Same 
values as document.readyState, etc.
Received on Wednesday, 25 March 2009 03:31:32 UTC

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