Re: [csswg-drafts] [css-pseudo-4] Should Element.pseudo("unknown") be an error or return null? (#3603)

Sure, but don't apply that too naively. We're not exposing a reified "pseudo-element query" object that, when resolved against an Element, returns a PseudoElement. We def don't intend to require you to construct `CSSKeywordValue`/etc objects to pass over to it. It's not a fully TypedOM-ified API, and isn't intended to be, as that would just be busywork for no benefit. (The object forms exist to make it easier to read/alter things from JS; they're *harder* to write from JS than strings are. This is a write-only API.)

Turning `.pseudo("::foo(bar, baz)")` into `.pseudo("foo", "bar", "baz")` is similarly just busywork making it harder to read/write and connect to the stylesheet syntax

-- 
GitHub Notification of comment by tabatkins
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3603#issuecomment-479680390 using your GitHub account

Received on Wednesday, 3 April 2019 22:23:31 UTC