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

Re: [css-om] CSSStyleDeclaration.parentElement

From: Simon Pieters <simonp@opera.com>
Date: Mon, 26 Aug 2013 11:24:35 +0200
To: "L. David Baron" <dbaron@dbaron.org>
Cc: "www-style@w3.org" <www-style@w3.org>, Fran├žois REMY <francois.remy.dev@outlook.com>
Message-ID: <op.w2e229fnidj3kv@simons-macbook-pro.local>
On Sun, 25 Aug 2013 08:09:42 +0200, L. David Baron <dbaron@dbaron.org>  

> On Thursday 2013-08-22 10:41 +0200, Simon Pieters wrote:
>> 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'm inclined to think "ownerNode" or "ownerElement" is a better name
> than "parentElement", though.  "parentElement" implies to me that
> it's a part of the element tree because it's parent is an element.
> But it's not part of the element tree; it's a style sheet, and its
> not in that element's childNodes.

I agree. I was going to call it "ownerNode" for consistency with  
StyleSheet#ownerNode if I put it in the spec, although PseudoElement isn't  
actually a Node.

>> 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.
> My inclination is that exposing something that implementations
> already have to maintain (where the maintaining doesn't seem
> reasonably avoidable in any future changes) should be held to a less
> stringent standard than this (probably at least in terms of the
> "more compelling use case" point).

Note that I said "one more more", not "all of these". :-) If you are  
saying that you are happy to implement this in Gecko, then the above is  
already satisfied. Is that the case?

> Exposing data structures that
> we're already required to have can turn out useful where we don't
> expect it to be, and is substantially cheaper than exposing
> something that doesn't reflect the underlying model (e.g., any
> proposed CSS value API, for at least some implementations).

Simon Pieters
Opera Software
Received on Monday, 26 August 2013 09:18:58 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:33 UTC