Re: [csswg-drafts] [web-animations-1] Clarification about `target` and `pseudoElement` relationship (#4745)

> @flackr from the MDN page on querySelectorAll()
> 
> > If the specified selectors include a CSS pseudo-element, the returned list is always empty.
> 
> It doesn't sound like we have two conventions for pseudo-elements. We only have the getComputedStyle convention as querySelector doesn't support pseudo-elements at all. Even the section linked above on unsupported pseudo-element selectors being treated as invalid is only used in a context where an invalid selector means a no-op.

The context in which [querySelector](https://dom.spec.whatwg.org/#dom-parentnode-queryselector) runs [scope-match a selectors string](https://dom.spec.whatwg.org/#scope-match-a-selectors-string) which uses the [parse a selector](https://drafts.csswg.org/selectors-4/#parse-a-selector) from selectors-4 which states that [an unsupported psuedo-element selector is treated as invalid](https://drafts.csswg.org/selectors-4/#invalid-selector) throws an exception as a result of the invalid selector. It seems odd to me that we wouldn't have consistent pseudo element parsing.

-- 
GitHub Notification of comment by flackr
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4745#issuecomment-597239938 using your GitHub account

Received on Tuesday, 10 March 2020 18:22:05 UTC