You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Scope-match a selectors string including a pseudo-element selector #1497
querySelector() does need to pass an empty list of allowed pseudo-elements, tho, since otherwise you get nonsensical results (there's no way to reflect a pseudo-element as a JS object right now).
[APIs using this algorithm] may optionally provide:
A list of pseudo-elements that are allowed to show up in the match list. If not specified, this defaults to allowing all pseudo-elements.
So I wonder if:
the procedures for querySelector() and querySelectorAll() should invoke scope-match a selectors string with an empty list of allowed pseudo-elements
scope-match a selectors string should always invoke match a tree against selector with an empty list of allowed pseudo-elements
match a selector against a tree should default to an empty list of allowed pseudo-elements
the WHATWG and CSSWG do not want to make a change because there is a plan to return pseudo-elements from querySelector() and querySelectorAll() in the future
Activity
Add support for resolving pseudo element styles
annevk commentedon Aug 23, 2026
@tabatkins could you perhaps provide guidance for this again? Thanks!