E84D [css-animations-2] Tweak proposed CSSAnimation constructor · w3c/csswg-drafts@42b2501 · GitHub
Skip to content

Commit 42b2501

Browse files
committed
[css-animations-2] Tweak proposed CSSAnimation constructor
1 parent cd33568 commit 42b2501

2 files changed

Lines changed: 82 additions & 25 deletions

File tree

css-animations-2/Overview.bs

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ pseudo-element to which the 'animation-name' property was applied that generated
7171
the animation.
7272

7373
If an animation was generated directly by script (e.g. using
74-
the {{CSSAnimation()}} constructor) then it has no <a>owning element</a>.
74+
the {{CSSAnimation}} constructor) then it has no <a>owning element</a>.
7575

7676
If an animation generated using the markup defined in this specification is
7777
later disassociated from that markup by an update to the computed value of the
@@ -116,7 +116,7 @@ animation.effect = null;
116116
## Animation composite order ## {#animation-composite-order}
117117
118118
<a spec='web-animations'>Animations</a> generated from the markup or interfaces
119-
(e.g. the {{CSSAnimation()}} constructor) defined in this specification have an
119+
(e.g. the {{CSSAnimation}} constructor) defined in this specification have an
120120
<a>animation type</a> of &lsquo;CSS Animation&rsquo;.
121121
122122
CSS Animations <em>with</em> an <a>owning element</a> have a <em>later</em>
@@ -163,7 +163,7 @@ Note, this behavior relies on the fact that disassociating an animation
163163
from its <a>owning element</a> always causes it to enter (or remain) in the
164164
<a>idle play state</a>.
165165
166-
CSS Animations created using the {{CSSAnimation()}} constructor are appended
166+
CSS Animations created using the {{CSSAnimation}} constructor are appended
167167
to the <a>global animation list</a> at the moment they are constructed.
168168
169169
# Keyframes # {#keyframes}
@@ -420,7 +420,7 @@ after the sample as follows:
420420
421421
Issue: Define the value of <code>elapsedTime</code> for each case.
422422
423-
# DOM interfaces # {#interface-dom}
423+
# DOM Interfaces # {#interface-dom}
424424
425425
## The CSSAnimation interface ## {#the-CSSAnimation-interface}
426426
@@ -436,15 +436,23 @@ interface CSSAnimation : Animation {
436436
This is the value of the 'animation-name' property that caused this
437437
object to be generated or, if this object was generated using the
438438
programming interface, the <code>animationName</code> argument
439-
that was passed to the {{CSSAnimation()}} constructor.
439+
that was passed to the {{CSSAnimation}} constructor.
440440
441441
<div class="issue">
442442
443443
We need to define a constructor for <a idl>CSSAnimation</a>.
444444
Perhaps something like the following:
445445
446446
<pre class="idl">
447-
[Constructor (DOMString animationName, DOMString defaultEasing)]
447+
[Constructor (Animatable? target,
448+
DOMString animationName,
449+
optional (unrestricted double or KeyframeEffectOptions) options,
450+
optional DOMString defaultEasing = "ease"),
451+
Constructor (Animatable? target,
452+
DOMString animationName,
453+
(unrestricted double or KeyframeEffectOptions) options,
454+
DOMString defaultEasing,
455+
AnimationTimeline? timeline)]
448456
partial interface CSSAnimation { };
449457
</pre>
450458
@@ -453,7 +461,7 @@ The difficulty is with liveness. The most useful and least magical
453461
{{KeyframeEffectReadOnly}} that has the special behavior of tracking changes
454462
to all @keyframes rules that match the supplied name and automatically
455463
updating the set of keyframes returned by
456-
{{KeyframeEffectReadOnly/getFrames()}} after filling in the default easing.
464+
{{KeyframeEffectReadOnly/getFrames()}} after filling-in the default easing.
457465
458466
Something like,
459467

0 commit comments

Comments
 (0)