Re: "match a selectors string" in the DOM spec doesn't do what it wants to be doing
Anne van Kesteren <[email protected]>
| Newsgroups | gmane.comp.web.dom.general |
|---|---|
| Message-ID | <CADnb78hzF_NYpK_Qrt=YpPBME3yNGAwE1g5oMx1JopHR5J4uOg@mail.gmail.com> |
On Fri, Aug 1, 2014 at 8:37 PM, Boris Zbarsky <[email protected]> wrote: > On 8/1/14, 2:28 PM, Tab Atkins Jr. wrote: >> I can add whatever's needed, obviously. > > What's needed is something that takes a single element and the result of > "parse a selector" [1] and returns a boolean for whether the parsed selector > matches the element. > > [1] http://dev.w3.org/csswg/selectors/#parse-a-selector If it started to return a boolean, the algorithm defined for http://dom.spec.whatwg.org/#dom-element-matches would no longer make sense. Nor would numerous other algorithms in DOM. -- http://annevankesteren.nl/