[selectors] "Match a selector" vs. ordering and pseudo-elements

Hi,

Selectors 4 defines a "match a selector" algorithm [1] (used in DOM for 
selectors APIs [2]), but it’s obvious what happens to pseudo-elements in 
this algorithm. DOM expects a list of elements (only) as a result.

"Append each element in single result to result" seems to imply 
excluding pseudo-elements in the process, but that should be explicit.

(This issue was originally in [3], but it now looks like Selector 4’s 
text needs a bit of tweaking.)

[1] http://dev.w3.org/csswg/selectors/#match-a-selector
[2] http://dom.spec.whatwg.org/#evaluate-a-relative-selectors-string
[3] https://www.w3.org/Bugs/Public/show_bug.cgi?id=23793


Also, I *think* that elements in API results are expected to be in 
document order, but I’m not sure that the algorithm as written in the 
current ED ensures that.

-- 
Simon Sapin

Received on Wednesday, 12 February 2014 21:07:21 UTC