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

[csswg-drafts] [web-animations] Error handling in KeyframeEffect.pseudoElement (#4586)

From: George Steel via GitHub <sysbot+gh@w3.org>
Date: Wed, 11 Dec 2019 23:00:36 +0000
To: public-css-archive@w3.org
Message-ID: <issues.opened-536661378-1576105235-sysbot+gh@w3.org>
george-steel has just created a new issue for https://github.com/w3c/csswg-drafts:

== [web-animations] Error handling in KeyframeEffect.pseudoElement ==
What should KeyframeEffect.pseudoElement do if it is set in an invalid or unsupported value? I can see a few possibilities here.

1. Throw an exception. This can easily break backwards compatibility as the set of pseudo-elements is not currently fixed. Running an animation with a new pseudoelement on an old browser can crash the whole script. I think it makes sense for inputs that don't start with "::" though.

2. Set pseudoElement to null. This fails without crashing but has the disadvantage of causing animations to happen on the wrong element in the case of an unsupported pseudo-element.

3. Leave pseudoElement unchanged. Again, can cause false positives.

4. Set pseudoElement to the text given and do not animate.

5. Set pseudoElement to s sentinel value (such as `::unknown`) which has no effect. Allows for error detection without the possibility of crashes.

My personal preference is for option 5.

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4586 using your GitHub account
Received on Wednesday, 11 December 2019 23:00:38 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:57 UTC