W3C home > Mailing lists > Public > www-style@w3.org > July 2011

Re: [Selectors4] Define Selectors in terms of the DOM

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Sun, 24 Jul 2011 17:13:33 -0700
Message-ID: <CAAWBYDAP74gL08aBWOdANtjkz2a1AY-WzOeXTG61K2ozmH+wOg@mail.gmail.com>
To: Anne van Kesteren <annevk@opera.com>
Cc: CSS WG <www-style@w3.org>
On Sun, Jul 24, 2011 at 4:43 PM, Anne van Kesteren <annevk@opera.com> wrote:
> I think Selectors need to be defined in terms of the DOM. The DOM is the
> tree model Selectors work upon in all implementations, and it is the tree
> model the languages we care about are defined in. And if we want Selectors
> to work for other tree models we could just state they have to be equivalent
> to the DOM. That would work. But hand-waving about the tree model Selectors
> work against should stop I think.

There are several instances of Selectors being used on non-DOM
structures.  For example, WebVTT, or <http://jsonselect.org/>.
There's no reason to exclude things like this.

What's the benefit of adopting the DOM as the data model?  The current
element-tree is almost the same thing; an element is just a thing with
a type, an id, a bag of classes, a bag of attribute key/value pairs,
and an arbitrary set of pseudo-classes.  That's basically just the DOM
notion of an element, minus anything irrelevant for Selectors.

Received on Monday, 25 July 2011 00:14:20 UTC

This archive was generated by hypermail 2.4.0 : Monday, 23 January 2023 02:14:02 UTC