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

tabatkins has just created a new issue for https://github.com/w3c/csswg-drafts:

== [cssom] getComputedStyle() needs to do CSS/parse on its "pseudo" argument ==
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.

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3875 using your GitHub account

Received on Thursday, 25 April 2019 21:34:08 UTC