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

Re: [css-om] CSSStyleDeclaration.parentElement

From: L. David Baron <dbaron@dbaron.org>
Date: Sat, 24 Aug 2013 23:09:42 -0700
To: Simon Pieters <simonp@opera.com>
Cc: "www-style@w3.org" <www-style@w3.org>, Franรงois REMY <francois.remy.dev@outlook.com>
Message-ID: <20130825060942.GA24170@crum.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 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).  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).

-David

-- 
๐„ž   L. David Baron                         http://dbaron.org/   ๐„‚
๐„ข   Mozilla                          https://www.mozilla.org/   ๐„‚
             Before I built a wall I'd ask to know
             What I was walling in or walling out,
             And to whom I was like to give offense.
               - Robert Frost, Mending Wall (1914)

Received on Sunday, 25 August 2013 06:10:21 UTC

This archive was generated by hypermail 2.3.1 : Sunday, 25 August 2013 06:10:24 UTC