Re: [csswg-drafts] [web-animations-1] Clarification about `target` and `pseudoElement` relationship (#4745)

> My understanding was that pseudo-elements conceptually always exist for every selector (even ones that aren't supported by the browser or spec'd anywhere). So the idea with the web-animation spec changes was that targeting, say, `::blargh` would target the conceptual pseudo-element with that selector (even if no browser would ever implement or create that).
> In effect, of course, such animations do nothing, and so browsers would be welcome to optimize them (as long they still stayed around* in case, e.g. the user changed the target).

I have a question related to this. If I've followed all the rabbit holes of the spec correctly, it currently says that when an animation with a syntactically invalid `<pseudo-element-selector>` is created, a `DOMException` with error name `SyntaxError` is thrown. When I pass the pseudo-selector `::blargh` to `Element.animate()`, I receive back a valid animation object in Canary and _"TypeError: Element.animate: Unsupported pseudo-selector '::blargh'"_ in Nightly. Which implementation is correct?

GitHub Notification of comment by lpd-au
Please view or discuss this issue at using your GitHub account

Received on Monday, 9 March 2020 15:04:32 UTC