W3C home > Mailing lists > Public > www-style@w3.org > August 2013

Re: [css-om] CSSStyleDeclaration.parentElement

From: Simon Pieters <simonp@opera.com>
Date: Thu, 22 Aug 2013 10:41:30 +0200
To: "www-style@w3.org" <www-style@w3.org>, Fran├žois REMY <francois.remy.dev@outlook.com>
Message-ID: <op.w17mfgyqidj3kv@simons-macbook-pro.local>
On Wed, 21 Aug 2013 18:57:12 +0200, Fran├žois REMY  
<francois.remy.dev@outlook.com> wrote:

>> So this property would point to the element for element.style but be  
>> null
>> for cssrule.style et al?
>
> Yes. So that either parentElement or parentRule have a non-null value.
>
>
>
>> I'm having a bit of difficulty reasoning around your use case since it's
>> about polyfilling. For instance, getting flow-from implemented in  
>> browsers
>> would remove the need for parentElement in your case.
>
> (1) there will always be a need to polyfill something on the web  
> platform, and more generally to expose new functions to the style  
> elements.

Yeah. But it's not a very compelling use case that is being presented, in  
my opinion.

> (2) the whole point of the css object model is... to expose the css  
> object model. why exposing parentRule but not parentElement? it doesn't  
> really make sense to me.
>
> (3) beside polyfilling use-cases, what could you use the "parentRule"  
> property for? did that prevent this property from existing? 		 	   		

I don't know what the use case is for parentRule. There's also  
http://dev.w3.org/csswg/cssom/#dom-stylesheet-ownernode . But that's by  
itself is not a good reason to add something else like it. New features  
need to justify themselves on their own merit.

I would like one or more of the following things demonstrated before I put  
the requested feature in the spec:

* a more compelling use case that this feature addresses.
* other developers working around the lack of this feature.
* implementation interest from one or more browser vendors for this  
feature.

Thanks
-- 
Simon Pieters
Opera Software
Received on Thursday, 22 August 2013 08:36:07 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 22 August 2013 08:36:08 UTC