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

Re: [selectors4] Proposal for extending Selectors Level 4 with possibility to select attributes

From: Simon Sapin <simon.sapin@exyr.org>
Date: Sun, 10 Nov 2013 15:00:57 +0800
Message-ID: <527F2F29.9060402@exyr.org>
To: Jirka Kosek <jirka@kosek.cz>, Simon Pieters <simonp@opera.com>
CC: www-style@w3.org, Daniel Glazman <daniel.glazman@disruptive-innovations.com>
On 07/11/2013 22:59, Jirka Kosek wrote:
>   ITS tools running in a browser are using
> Selectors API to evaluate ITS rules that are using Selectors as a query
> language.

So in addition to a new feature in Selectors, you’ll need to get 
Selector API (now defined in the DOM spec) updated, as it explicitly 
defines that the return values (either NodeList or Elements) can only be 
elements and not other types of nodes.

Additionally, Attr is not a Node anymore and therefore can not be part 
of a NodeList. (Note in [1] the lack of interface inheritance compared 
to [2].)

[1] http://dom.spec.whatwg.org/#attr
[2] http://dom.spec.whatwg.org/#element


Today you can already use these API to select elements, then use 
.getAttribute()

How would the APIs work with your proposal?

-- 
Simon Sapin
Received on Sunday, 10 November 2013 07:01:33 UTC

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