W3C home > Mailing lists > Public > www-style@w3.org > May 2007

Re: [cssom] LinkStyle, etc.

From: Anne van Kesteren <annevk@opera.com>
Date: Mon, 14 May 2007 09:56:34 +0200
To: "Boris Zbarsky" <bzbarsky@mit.edu>
Cc: "Ian Hickson" <ian@hixie.ch>, www-style@w3.org
Message-ID: <op.tsa4cklv64w2qv@annevk.oslo.opera.com>

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.


>> 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
Received on Monday, 14 May 2007 07:56:59 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:28 UTC