Skip to content
This repository was archived by the owner on Jun 7, 2018. It is now read-only.

Commit 6d9fd5f

Browse files
committed
Update references to requestAnimationFrame to point to HTML spec
1 parent 8b32ab3 commit 6d9fd5f

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

Overview.bs

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,8 @@ urlPrefix: https://html.spec.whatwg.org/multipage/webappapis.html; type: dfn; sp
9191
text: event loop processing model
9292
text: document.open(); url: dom-document-open
9393
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
9496
urlPrefix: https://html.spec.whatwg.org/multipage/infrastructure.html; type: dfn; spec: html
9597
text: fire; url: concept-event-fire
9698
urlPrefix: https://html.spec.whatwg.org/multipage/embedded-content.html; type: dfn; spec: html
@@ -195,7 +197,7 @@ document.getAnimations().forEach(
195197

196198
: Creating animations from script
197199
:: While it is possible to use ECMAScript to perform animation using
198-
<code>requestAnimationFrame</code> [[ANIMATION-TIMING]],
200+
<code>requestAnimationFrame</code> [[!HTML]],
199201
such animations behave differently to declarative animation in terms of
200202
how they are represented in the CSS cascade and the performance
201203
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
308310
the Web Animations model, the dependency between SVG and SMIL
309311
Animation can be removed.
310312

311-
As with Timing control for script-based animations (commonly referred
312-
to as &ldquo;requestAnimationFrame&rdquo;) [[ANIMATION-TIMING]],
313+
As with <a>animation frame callbacks</a> (commonly referred
314+
to as &ldquo;requestAnimationFrame&rdquo;) [[HTML]],
313315
the programming interface component of this specification allows
314316
animations to be created from script.
315317
The animations created using the interface defined in this
@@ -320,9 +322,9 @@ Using this interface it is possible to create animations
320322
from script in a simpler and more performant manner.
321323

322324
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.
326328

327329
The programming interface component of this specification makes
328330
some additions to interfaces defined in HTML [[!HTML]].
@@ -7446,8 +7448,7 @@ alert(b - a); // Displays 0</pre>
74467448
: The time passed to a <code>requestAnimationFrame</code> callback
74477449
will be equal to <code>document.timeline.currentTime</code>
74487450
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]],
74517452
HTML's <a>event loop processing model</a> defines that animations are
74527453
updated prior to running animation frame callbacks.
74537454
@@ -7463,9 +7464,9 @@ alert(b - a); // Displays 0</pre>
74637464
74647465
<div class="example">
74657466
<pre class="lang-javascript">
7466-
window.requestAnimationFrame(function(sampleTime) {
7467-
// Displays &lsquo;0&rsquo;
7468-
alert(sampleTime - document.timeline.currentTime);
7467+
window.requestAnimationFrame(function(now) {
7468+
// Displays 0
7469+
alert(now - document.timeline.currentTime);
74697470
});</pre>
74707471
</div>
74717472

0 commit comments

Comments
 (0)