W3C home > Mailing lists > Public > public-css-archive@w3.org > April 2019

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

From: Tab Atkins Jr. via GitHub <sysbot+gh@w3.org>
Date: Thu, 25 Apr 2019 21:34:06 +0000
To: public-css-archive@w3.org
Message-ID: <issues.opened-437407487-1556228045-sysbot+gh@w3.org>
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

This archive was generated by hypermail 2.4.0 : Tuesday, 19 October 2021 01:31:07 UTC