- From: Brian Birtles via GitHub <sysbot+gh@w3.org>
- Date: Wed, 11 Mar 2020 02:56:34 +0000
- To: public-css-archive@w3.org
Yes, although I understand some pseudo-elements only have an effect on certain elements, I think the wording in selectors-4 refers to support independent of the target element, > UAs must treat as invalid any pseudo-classes, pseudo-elements, combinators, or other syntactic constructs for which they have no usable level of support. That is, we should throw here when the UA doesn't have any support for the pseudo-element, whatsoever, but not in the case when the UA does not support the specific pseudo-element and element combination (for that presumably there will simply be no effect). That text also treats both parsing errors and unsupported pseudo-elements as the same class, "invalid", so I think we should throw for both cases rather than making a distinction here. `querySelector` throws a `"SyntaxError"` for invalid selectors so I think we should do that here. (And checking in Firefox and Chrome, both throw for `document.querySelector('yer::yer')` but return null for `document.querySelector('yer::before')`) -- GitHub Notification of comment by birtles Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4745#issuecomment-597418682 using your GitHub account
Received on Wednesday, 11 March 2020 02:56:36 UTC