Re: [cssom] LinkStyle, etc.

On Mon, 14 May 2007 07:06:07 +0200, Boris Zbarsky <bzbarsky@MIT.EDU> wrote:
> Anne van Kesteren wrote:
>>>>>> 1)  Should a change of "rel" from "alternate stylesheet" to
>>>>>> "stylesheet" have any effect?  If so, what?
> ....
>> Fair enough. I think this should be addressed by HTML5 though.
>
> That's fine by me, as long as _something_ covers it.

Hixie?


>> I'm not sure. We could either do it that updating LinkStyle.sheet.href  
>> will potentially give a different result from updating  
>> HTMLLinkElement.href or we could keep them in sync somehow.
>
> StyleSheet.href is readonly, so I'm not sure what you mean here.  We  
> were talking about .disabled, no?

Oh duh. In my mind this was more complicated...


>> Maybe it would be more consistent if HTML5 just defined how  
>> HTMLLinkElement and HTMLStyleElement work and that LinkStyle.sheet is  
>> "separate" from them. As in, what updating LinkStyle.sheet members  
>> would do would be defined in the CSSOM and would not affect  
>> HTMLLinkElement and such...
>
> Then you need to describe the interaction between the two properties.   
> e.g., what happens if the sheet is enabled and the node is disabled?   
> What happens on setting the node disabled?  Does it matter if the sheet  
> is already loaded?

HTML5 should already define that modifying HTMLLinkElement.disabled for  
instance changes LinkStyle.sheet.disabled. The only issue seems to be what  
setting LinkStyle.sheet.disabled will do for HTMLLinkElement.disabled (and  
similar nodes).


> I suspect that having them completely disconnected is not really that  
> useful, and _is_ very confusing.

I suppose that we could say that on setting StyleSheet.disabled if  
ownerNode has a disabled DOM attribute it would be set to the same value.  
However, that would cause loops given that setting that disabled DOM  
attribute would affect StyleSheet.disabled... Maybe it should only be set  
(both ways) if disabled not already has the same value.


-- 
Anne van Kesteren
<http://annevankesteren.nl/>
<http://www.opera.com/>

Received on Monday, 14 May 2007 07:56:59 UTC