- From: fantasai <fantasai.lists@inkedblade.net>
- Date: Thu, 27 Aug 2015 13:08:30 +0200
- To: "Tab Atkins Jr." <jackalmage@gmail.com>
- Cc: www-style list <www-style@w3.org>
On 08/27/2015 10:21 AM, Anne van Kesteren wrote: > On Thu, Aug 27, 2015 at 9:41 AM, fantasai <fantasai.lists@inkedblade.net> wrote: >> Right, this text doesn't appear in the section on :empty. > > I don't understand how that makes sense. ... I don't understand what's confusing. The things that skip non-element nodes specify that they skip non-element nodes. Things that care about non-element children say what they care about. The model of what's significant might be inconsistent, but everything's specified explicitly. >> Perhaps you're misunderstanding what I meant. DOM provides the entire >> DOM tree for pattern-matching--of course. But for its .query methods >> the DOM spec compiles the list of elements that are potential output >> and filters them by whether or not they match. Selectors only defines >> what it means for an element to match. > > How does that solve anything for pseudo-elements, which are not > elements and cannot be matched? The algorithm currently specified in "evaluate a selector", which you are invoking in DOM, returns pseudo-elements in addition to elements unless otherwise specified. And DOM does not otherwise specify. (Things like this is why I'm advocating for just using "match" as the spec interface.) >> This way Selectors doesn't need to decide what elements are valid >> output, or define how to traverse the DOM tree to find said potential >> output elements, or define out the output of .querySelector is sorted >> or otherwise represented. These are particulars of the .query methods, >> not particulars of how selectors work, so they belong in DOM, not in >> Selectors. > > Yeah maybe. It's somewhat annoying that we're revisiting this setup a > good year after we decided on something. Feel free to provide PRs > here: https://github.com/whatwg/dom. Okay. Will argue this with dbaron and Tab and see if we can settle on some wording. (Sorry about the late review. I didn't have time to keep up with Selectors year ago.) ~fantasai
Received on Thursday, 27 August 2015 11:09:00 UTC