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

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