Skip to content

[css-pseudo-4] Add a note explaining Element.pseudo() behaviour #12159 #12406

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

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?

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.

2 participants