Skip to content

Conversation

@danielsakhapov
Copy link
Contributor

As per resolution in #12159, Element.pseudo() returns CSSPseudoElement even when invoked on Element that can't generate the requested type.

…2159

As per resolution in w3c#12159, Element.pseudo() returns CSSPseudoElement
even when invoked on Element that can't generate the requested type.
@astearns
Copy link
Member

The note is good to explain and reference the reasoning why, but notes are non-normative. We’ll also need a normative change to the algorithm

@danielsakhapov
Copy link
Contributor Author

The algorithm will be unchanged, won't it? It still returns a CSSPseudoElement object if the selector is valid.
I started the issue and planned this note as just an additional info to clarify the case like e.g. <input>.pseudo(::before) returns CSSPseudoElement even though <input> can't generate ::before:.
My point is that per current algorithm description says: the selector ::before is valid, so it returns CSSPseudoElement. I don't see what changes we should add with that resolution, could you, please, explain?

@danielsakhapov
Copy link
Contributor Author

@astearns gentle ping

@tabatkins tabatkins merged commit ede8539 into w3c:main Jul 23, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants