Skip to content

Commit 1f8e735

Browse files
birtlesflackr
authored andcommitted
[web-animations-1] Clarify that unsupported pseudo-elements are also invalid
See discussion in #4745.
1 parent 3d61f9d commit 1f8e735

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

web-animations-1/Overview.bs

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4692,9 +4692,9 @@ interface KeyframeEffect : AnimationEffect {
46924692
object? keyframes,
46934693
optional (unrestricted double or KeyframeEffectOptions) options = {});
46944694
constructor(KeyframeEffect source);
4695-
attribute Element? target;
4696-
attribute CSSOMString? pseudoElement;
4697-
attribute CompositeOperation composite;
4695+
attribute Element? target;
4696+
attribute CSSOMString? pseudoElement;
4697+
attribute CompositeOperation composite;
46984698
sequence<object> getKeyframes();
46994699
void setKeyframes(object? keyframes);
47004700
};
@@ -4844,11 +4844,18 @@ interface KeyframeEffect : AnimationEffect {
48444844
sets the [=target pseudo-selector=] of the [=animation effect=]
48454845
to the provided value after applying the following exceptions:
48464846

4847-
* If the provided value is not `null` or a syntactically valid
4848-
<<pseudo-element-selector>> the user agent must [=throw=]
4849-
a {{DOMException}} with error name {{SyntaxError}} and leave the
4847+
* If the provided value is not `null`
4848+
and is an invalid <<pseudo-element-selector>>,
4849+
the user agent must [=throw=] a {{DOMException}}
4850+
with error name {{SyntaxError}} and leave the
48504851
[=target pseudo-selector=] of this [=animation effect=] unchanged.
48514852

4853+
Note, that invalid in this context follows the definition of
4854+
an [=invalid selector=] defined in [[!SELECTORS-4]] such that
4855+
syntactically invalid pseudo-elements as well as pseudo-elements
4856+
for which the user agent has no usable level of support are
4857+
both deemed invalid.
4858+
48524859
* If one of the legacy Selectors Level 2 single-colon selectors
48534860
(':before', ':after', ':first-letter', or ':first-line') is
48544861
specified, the [=target pseudo-selector=] must be set to the

0 commit comments

Comments
 (0)