Skip to content

[cssom] getComputedStyle() needs to do CSS/parse on its "pseudo" argument #3875

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

Closed
tabatkins opened this issue Apr 25, 2019 · 1 comment · Fixed by #3924
Closed

[cssom] getComputedStyle() needs to do CSS/parse on its "pseudo" argument #3875

tabatkins opened this issue Apr 25, 2019 · 1 comment · Fixed by #3924
Assignees
Labels
cssom-1 Current Work

Comments

@tabatkins
Copy link
Member

Currently CSSOM says:

If it is an ASCII case-insensitive match for a pseudo-element that the UA supports, other than ::slotted(), let obj be the given pseudo-element of elt.

This isn't a well-founded operation; there's no way to match a string against a pseudo-element. You need to do a [=CSS/parse=] of the string (clarifying that CSS syntax in general is supported; otherwise you have to define bespoke parsing) as a <<pseudo-element-selector>>, and then have it represent the corresponding pseudo-element that would match that selector on the element.

See https://drafts.csswg.org/css-pseudo-4/#window-interface for an example of similar text.

@tabatkins tabatkins added the cssom-1 Current Work label Apr 25, 2019
@emilio
Copy link
Collaborator

emilio commented Apr 25, 2019

Will fix, thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cssom-1 Current Work
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants