@@ -5631,27 +5631,33 @@ The {{KeyframeEffect}} interface {#the-keyframeeffect-interface}
56315631
56325632 On setting,
56335633 sets the [=target pseudo-selector=] of the [=animation effect=]
5634- to the provided value
5635- after applying the following exceptions:
5636-
5637- * If the provided value is not `null`
5638- and is an [=invalid selector|invalid=] <<pseudo-element-selector>> ,
5639- the user agent must [=throw=] a {{DOMException}}
5640- with error name "{{SyntaxError}} " and leave the
5641- [=target pseudo-selector=] of this [=animation effect=] unchanged.
5642-
5643- Note: Invalid in this context follows the definition of
5644- an [=invalid selector=] defined in [[!SELECTORS-4]]
5645- such that syntactically invalid pseudo-elements
5646- as well as pseudo-elements for which the user agent
5647- has no usable level of support
5648- are both deemed invalid.
5649-
5650- * If one of the legacy Selectors Level 2 single-colon selectors
5651- (':before' , ':after' , ':first-letter' , or ':first-line' )
5652- is specified,
5653- the [=target pseudo-selector=] must be set
5654- to the equivalent two-colon selector (e.g. '::before' ).
5634+ to the result of <dfn>pseudo-element parsing</dfn> on the provided value,
5635+ defined as the following:
5636+
5637+ 1. Given the value |value|, perform the following steps:
5638+ 1. If |value| is not `null`
5639+ and is an [=invalid selector|invalid=] <<pseudo-element-selector>> ,
5640+
5641+ 1. [=Throw=] a {{DOMException}}
5642+ with error name "{{SyntaxError}} ".
5643+
5644+ 1. Abort.
5645+
5646+ Note: In effect, this means that if the result of this algorithm is
5647+ used to set a variable, then that variable remains unchanged.
5648+
5649+ Note: Invalid in this context follows the definition of
5650+ an [=invalid selector=] defined in [[!SELECTORS-4]]
5651+ such that syntactically invalid pseudo-elements
5652+ as well as pseudo-elements for which the user agent
5653+ has no usable level of support
5654+ are both deemed invalid.
5655+
5656+ 1. If |value| is one of the legacy Selectors Level 2 single-colon selectors
5657+ (':before' , ':after' , ':first-letter' , or ':first-line' ), then
5658+ return the equivalent two-colon selector (e.g. '::before' ).
5659+
5660+ 1. Otherwise, return |value|.
56555661
56565662 : <dfn>composite</dfn>
56575663 ::
@@ -6652,6 +6658,7 @@ The <code>Animatable</code> interface mixin {#the-animatable-interface-mixin}
66526658
66536659 dictionary GetAnimationsOptions {
66546660 boolean subtree = false;
6661+ CSSOMString? pseudoElement = null;
66556662 };
66566663 </xmp>
66576664
@@ -6733,12 +6740,24 @@ The <code>Animatable</code> interface mixin {#the-animatable-interface-mixin}
67336740
67346741 : <dfn lt="getAnimations(options)">sequence<Animation> getAnimations(|options|)</dfn>
67356742 ::
6736- Returns the set of [=relevant animations=] for this object,
6737- or, if an {{Animatable/getAnimations(options)/options}} parameter
6738- is passed with {{GetAnimationsOptions/subtree}} set to true,
6739- returns the set of [=relevant animations for a subtree=] for this object.
6743+ 1. Let |object| be the object on which this method was called.
6744+
6745+ 1. Let |pseudoElement| be the result of {{KeyframeEffect/pseudo-element parsing}}
6746+ applied to {{GetAnimationsOptions/pseudoElement}} of {{Animatable/getAnimations(options)/options}} ,
6747+ or `null` if {{Animatable/getAnimations(options)/options}} is not passed.
6748+
6749+ 1. If |pseudoElement| is not `null`,
6750+ then let |target| be the [=pseudo-element=]
6751+ identified by |pseudoElement|
6752+ with |object| as the originating element.
6753+ Otherwise, let |target| be |object|.
67406754
6741- The returned list is sorted using
6755+ 1. If {{Animatable/getAnimations(options)/options}} is passed
6756+ with {{GetAnimationsOptions/subtree}} set to true,
6757+ then return the set of [=relevant animations for a subtree=] of |target|.
6758+ Otherwise, return the set of [=relevant animations=] for |target|.
6759+
6760+ The list returned by the above algorithm is sorted using
67426761 the composite order described for the associated [=animations=]
67436762 of effects in [[#the-effect-stack]] .
67446763
@@ -6782,6 +6801,12 @@ The <code>Animatable</code> interface mixin {#the-animatable-interface-mixin}
67826801 on which {{Animatable/getAnimations()}} is called
67836802 should also be included in the result.
67846803
6804+ : <dfn for=GetAnimationsOptions>pseudoElement</dfn>
6805+ ::
6806+ If set, indicates that the target of the operation is the [=pseudo-element=]
6807+ identified by this pseudo selector (e.g. `::before`)
6808+ with the originating element being the object on which the function is called.
6809+
67856810 </div>
67866811
67876812Extensions to the {{Document}} interface {#extensions-to-the-document-interface}
@@ -7268,4 +7293,4 @@ Animation of 'box-shadow' and 'text-shadow' {#animating-shadow-lists}
72687293 follows the matching rules for interpolation above,
72697294 performing addition on each component according to its type,
72707295 or falling back to [=discrete=] animation
7271- if the ''shadow/inset'' values do not match.
7296+ if the ''shadow/inset'' values do not match.
0 commit comments