@@ -91,6 +91,8 @@ urlPrefix: https://html.spec.whatwg.org/multipage/webappapis.html; type: dfn; sp
91
91
text: event loop processing model
92
92
text: document.open(); url: dom-document-open
93
93
text: relevant Realm; url: concept-relevant-realm
94
+ urlPrefix: https://html.spec.whatwg.org/multipage/imagebitmap-and-animations.html.html; type: dfn; spec: html
95
+ text: animation frame callbacks; url: animation-frames
94
96
urlPrefix: https://html.spec.whatwg.org/multipage/infrastructure.html; type: dfn; spec: html
95
97
text: fire; url: concept-event-fire
96
98
urlPrefix: https://html.spec.whatwg.org/multipage/embedded-content.html; type: dfn; spec: html
@@ -195,7 +197,7 @@ document.getAnimations().forEach(
195
197
196
198
: Creating animations from script
197
199
:: While it is possible to use ECMAScript to perform animation using
198
- <code> requestAnimationFrame</code> [[ANIMATION-TIMING ]] ,
200
+ <code> requestAnimationFrame</code> [[!HTML ]] ,
199
201
such animations behave differently to declarative animation in terms of
200
202
how they are represented in the CSS cascade and the performance
201
203
optimizations that are possible such as performing the animation on a
@@ -308,8 +310,8 @@ It is intended that by defining SVG's animation features in terms of
308
310
the Web Animations model, the dependency between SVG and SMIL
309
311
Animation can be removed.
310
312
311
- As with Timing control for script-based animations (commonly referred
312
- to as “requestAnimationFrame”) [[ANIMATION-TIMING ]] ,
313
+ As with <a>animation frame callbacks</a> (commonly referred
314
+ to as “requestAnimationFrame”) [[HTML ]] ,
313
315
the programming interface component of this specification allows
314
316
animations to be created from script.
315
317
The animations created using the interface defined in this
@@ -320,9 +322,9 @@ Using this interface it is possible to create animations
320
322
from script in a simpler and more performant manner.
321
323
322
324
The time values used within the programming interface
323
- correspond with those used in Timing control for script-based
324
- animations [[ANIMATION-TIMING]] and their execution order is defined
325
- such that the two interfaces can be used simultaneously without conflict.
325
+ correspond with those used in <a>animation frame callbacks</a> [[HTML]]
326
+ and their execution order is defined such that the two interfaces can be used
327
+ simultaneously without conflict.
326
328
327
329
The programming interface component of this specification makes
328
330
some additions to interfaces defined in HTML [[!HTML]] .
@@ -7446,8 +7448,7 @@ alert(b - a); // Displays 0</pre>
7446
7448
: The time passed to a <code>requestAnimationFrame</code> callback
7447
7449
will be equal to <code>document.timeline.currentTime</code>
7448
7450
7449
- :: For user agent that support Timing control for script-based
7450
- animations [[ANIMATION-TIMING]],
7451
+ :: For user agent that support <a>animation frame callbacks</a> [[HTML]],
7451
7452
HTML's <a>event loop processing model</a> defines that animations are
7452
7453
updated prior to running animation frame callbacks.
7453
7454
@@ -7463,9 +7464,9 @@ alert(b - a); // Displays 0</pre>
7463
7464
7464
7465
<div class="example">
7465
7466
<pre class="lang-javascript">
7466
- window.requestAnimationFrame(function(sampleTime ) {
7467
- // Displays ‘0’
7468
- alert(sampleTime - document.timeline.currentTime);
7467
+ window.requestAnimationFrame(function(now ) {
7468
+ // Displays 0
7469
+ alert(now - document.timeline.currentTime);
7469
7470
});</pre>
7470
7471
</div>
7471
7472
0 commit comments