diff --git a/web-animations-1/Overview.bs b/web-animations-1/Overview.bs index a2cc9352e441..6539775cf955 100644 --- a/web-animations-1/Overview.bs +++ b/web-animations-1/Overview.bs @@ -5631,27 +5631,33 @@ The {{KeyframeEffect}} interface {#the-keyframeeffect-interface} On setting, sets the [=target pseudo-selector=] of the [=animation effect=] - to the provided value - after applying the following exceptions: - - * If the provided value is not `null` - and is an [=invalid selector|invalid=] <>, - the user agent must [=throw=] a {{DOMException}} - with error name "{{SyntaxError}}" and leave the - [=target pseudo-selector=] of this [=animation effect=] unchanged. - - Note: Invalid in this context follows the definition of - an [=invalid selector=] defined in [[!SELECTORS-4]] - such that syntactically invalid pseudo-elements - as well as pseudo-elements for which the user agent - has no usable level of support - are both deemed invalid. - - * If one of the legacy Selectors Level 2 single-colon selectors - (':before', ':after', ':first-letter', or ':first-line') - is specified, - the [=target pseudo-selector=] must be set - to the equivalent two-colon selector (e.g. '::before'). + to the result of pseudo-element parsing on the provided value, + defined as the following: + + 1. Given the value |value|, perform the following steps: + 1. If |value| is not `null` + and is an [=invalid selector|invalid=] <>, + + 1. [=Throw=] a {{DOMException}} + with error name "{{SyntaxError}}". + + 1. Abort. + + Note: In effect, this means that if the result of this algorithm is + used to set a variable, then that variable remains unchanged. + + Note: Invalid in this context follows the definition of + an [=invalid selector=] defined in [[!SELECTORS-4]] + such that syntactically invalid pseudo-elements + as well as pseudo-elements for which the user agent + has no usable level of support + are both deemed invalid. + + 1. If |value| is one of the legacy Selectors Level 2 single-colon selectors + (':before', ':after', ':first-letter', or ':first-line'), then + return the equivalent two-colon selector (e.g. '::before'). + + 1. Otherwise, return |value|. : composite :: @@ -6652,6 +6658,7 @@ The Animatable interface mixin {#the-animatable-interface-mixin} dictionary GetAnimationsOptions { boolean subtree = false; + CSSOMString? pseudoElement = null; }; @@ -6733,12 +6740,24 @@ The Animatable interface mixin {#the-animatable-interface-mixin} : sequence getAnimations(|options|) :: - Returns the set of [=relevant animations=] for this object, - or, if an {{Animatable/getAnimations(options)/options}} parameter - is passed with {{GetAnimationsOptions/subtree}} set to true, - returns the set of [=relevant animations for a subtree=] for this object. + 1. Let |object| be the object on which this method was called. + + 1. Let |pseudoElement| be the result of {{KeyframeEffect/pseudo-element parsing}} + applied to {{GetAnimationsOptions/pseudoElement}} of {{Animatable/getAnimations(options)/options}}, + or `null` if {{Animatable/getAnimations(options)/options}} is not passed. + + 1. If |pseudoElement| is not `null`, + then let |target| be the [=pseudo-element=] + identified by |pseudoElement| + with |object| as the originating element. + Otherwise, let |target| be |object|. - The returned list is sorted using + 1. If {{Animatable/getAnimations(options)/options}} is passed + with {{GetAnimationsOptions/subtree}} set to true, + then return the set of [=relevant animations for a subtree=] of |target|. + Otherwise, return the set of [=relevant animations=] for |target|. + + The list returned by the above algorithm is sorted using the composite order described for the associated [=animations=] of effects in [[#the-effect-stack]]. @@ -6782,6 +6801,12 @@ The Animatable interface mixin {#the-animatable-interface-mixin} on which {{Animatable/getAnimations()}} is called should also be included in the result. + : pseudoElement + :: + If set, indicates that the target of the operation is the [=pseudo-element=] + identified by this pseudo selector (e.g. `::before`) + with the originating element being the object on which the function is called. + Extensions to the {{Document}} interface {#extensions-to-the-document-interface} @@ -7268,4 +7293,4 @@ Animation of 'box-shadow' and 'text-shadow' {#animating-shadow-lists} follows the matching rules for interpolation above, performing addition on each component according to its type, or falling back to [=discrete=] animation - if the ''shadow/inset'' values do not match. \ No newline at end of file + if the ''shadow/inset'' values do not match.