@@ -5215,11 +5215,9 @@ <h3 id="the-animationnode-interface">The <code>AnimationNode</code> interface</h
5215
5215
Note that this definition precludes the following usage since
5216
5216
< code > node</ code > is an < a > inclusive ancestor</ a > of itself:
5217
5217
5218
- FIXME: pre needs to work in lists.
5219
-
5220
- < div class ="example sh_javascript ">
5221
- node.before(node); // throws HierarchyRequestError
5222
- </ div >
5218
+ < div > < pre class ="example sh_javascript ">
5219
+ node.before(node); // throws HierarchyRequestError
5220
+ </ pre > </ div >
5223
5221
</ div >
5224
5222
5225
5223
: < dfn method for =AnimationNode title ='after() '>
@@ -6268,16 +6266,16 @@ <h3 id="the-animatable-interface">The <code>Animatable</code> interface</h3>
6268
6266
6269
6267
The following code fragment:
6270
6268
6271
- FIXME: < div class ="example sh_javascript ">
6269
+ < div > < pre class ="example sh_javascript ">
6272
6270
var anim = elem.animate({ opacity: 0 }, 2000);
6273
- </ div >
6271
+ </ pre > </ div >
6274
6272
6275
6273
is equivalent to:
6276
6274
6277
- FIXME: < div class ="example sh_javascript ">
6275
+ < div > < pre class ="example sh_javascript ">
6278
6276
var anim = new Animation(elem, { opacity: 0 }, 2000);
6279
6277
elem.ownerDocument.timeline.play(anim);
6280
- </ div >
6278
+ </ pre > </ div >
6281
6279
6282
6280
Returns the {{AnimationPlayer}} object returned by the
6283
6281
< code > play</ code > method of the {{AnimationTimeline}}.
@@ -7244,12 +7242,11 @@ <h3 id="script-execution-and-live-updates-to-the-model">Script execution and liv
7244
7242
animation's < code > startTime</ code > will reflect updated state of
7245
7243
the model immediately.
7246
7244
7247
- FIXME: < div class ="example sh_javascript ">
7245
+ < div > < pre class ="example sh_javascript ">
7248
7246
// Initially player.src.localTime is 3000
7249
7247
player.currentTime += 2000;
7250
7248
alert(player.src.localTime); // Displays ‘5000’
7251
-
7252
- </ div >
7249
+ </ pre > </ div >
7253
7250
7254
7251
The same concept applies to more complex modifications of the
7255
7252
Web Animations model such as adding and removing children from
@@ -7270,24 +7267,22 @@ <h3 id="script-execution-and-live-updates-to-the-model">Script execution and liv
7270
7267
element, the result of the new animation will be
7271
7268
incorporated in the value returned.
7272
7269
7273
- FIXME: < div class ="example sh_javascript ">
7274
- // Set opacity to 0 immediately
7275
- elem.animate({ opacity: 0 }, { fill: ‘forwards’ });
7276
- alert(window.getComputedStyle(elem).opacity); // Displays ‘0’
7277
-
7278
- </ div >
7270
+ < div > < pre class ="example sh_javascript ">
7271
+ // Set opacity to 0 immediately
7272
+ elem.animate({ opacity: 0 }, { fill: ‘forwards’ });
7273
+ alert(window.getComputedStyle(elem).opacity); // Displays ‘0’
7274
+ </ pre > </ div >
7279
7275
7280
7276
The means of querying the animated value of an attribute depends
7281
7277
on the interface defined for the attribute.
7282
7278
SVG 1.1 [[!SVG11]] defines an additional interface for querying
7283
7279
animated values.
7284
7280
7285
- FIXME: < div class ="example sh_javascript ">
7286
- // Set width to 0 immediately
7287
- rect.animate({ width: ‘100px’ }, { fill: ‘forwards’ });
7288
- alert(rect.width.animVal.value); // Displays ‘100’
7289
-
7290
- </ div >
7281
+ < div > < pre class ="example sh_javascript ">
7282
+ // Set width to 0 immediately
7283
+ rect.animate({ width: ‘100px’ }, { fill: ‘forwards’ });
7284
+ alert(rect.width.animVal.value); // Displays ‘100’
7285
+ </ pre > </ div >
7291
7286
7292
7287
</ div >
7293
7288
@@ -7301,14 +7296,13 @@ <h3 id="script-execution-and-live-updates-to-the-model">Script execution and liv
7301
7296
not be called until < em > after</ em > the script block has
7302
7297
completed during regular sampling.
7303
7298
7304
- FIXME: < div class ="example sh_javascript ">
7305
- var timesCalled = 0;
7306
- elem.animate(function() {
7307
- timesCalled++;
7308
- }, 10000);
7309
- alert(timesCalled); // Displays ‘0’
7310
-
7311
- </ div >
7299
+ < div > < pre class ="example sh_javascript ">
7300
+ var timesCalled = 0;
7301
+ elem.animate(function() {
7302
+ timesCalled++;
7303
+ }, 10000);
7304
+ alert(timesCalled); // Displays ‘0’
7305
+ </ pre > </ div >
7312
7306
7313
7307
</ div >
7314
7308
@@ -7327,13 +7321,12 @@ <h3 id="script-execution-and-live-updates-to-the-model">Script execution and liv
7327
7321
a situation where < em > only</ em > the change to specified style is
7328
7322
rendered without the animation.
7329
7323
7330
- FIXME: < div class ="example sh_javascript ">
7331
- // Fade the opacity with fallback for browsers that don't
7332
- // support Element.animate
7333
- elem.style.opacity = ‘0&rqsuo;
7334
- elem.animate([ { opacity: 1 }, { opacity: 0 } ], 500);
7335
-
7336
- </ div >
7324
+ < div > < pre class ="example sh_javascript ">
7325
+ // Fade the opacity with fallback for browsers that don't
7326
+ // support Element.animate
7327
+ elem.style.opacity = ‘0&rqsuo;
7328
+ elem.animate([ { opacity: 1 }, { opacity: 0 } ], 500);
7329
+ </ pre > </ div >
7337
7330
7338
7331
Note that a user agent may render a frame with < em > none</ em > of
7339
7332
the changes made in a script execution block.
@@ -7353,13 +7346,12 @@ <h3 id="script-execution-and-live-updates-to-the-model">Script execution and liv
7353
7346
a long block of code that is executed in the same script block
7354
7347
will return the same value as shown in the following example.
7355
7348
7356
- FIXME: < div class ="example sh_javascript ">
7357
- var a = document.timeline.currentTime;
7358
- // ... many lines of code ...
7359
- var b = document.timeline.currentTime;
7360
- alert(b - a); // Displays 0
7361
-
7362
- </ div >
7349
+ < div > < pre class ="example sh_javascript ">
7350
+ var a = document.timeline.currentTime;
7351
+ // ... many lines of code ...
7352
+ var b = document.timeline.currentTime;
7353
+ alert(b - a); // Displays 0
7354
+ </ pre > </ div >
7363
7355
7364
7356
</ div >
7365
7357
@@ -7395,13 +7387,12 @@ <h3 id="script-execution-and-live-updates-to-the-model">Script execution and liv
7395
7387
a < code > requestAnimationFrame</ code > callback acts as
7396
7388
an alias for < code > document.timeline.currentTime</ code > .
7397
7389
7398
- FIXME: < div class ="example sh_javascript ">
7399
- window.requestAnimationFrame(function(sampleTime) {
7400
- // Displays ‘0’
7401
- alert(sampleTime - document.timeline.currentTime);
7402
- });
7403
-
7404
- </ div >
7390
+ < div > < pre class ="example sh_javascript ">
7391
+ window.requestAnimationFrame(function(sampleTime) {
7392
+ // Displays ‘0’
7393
+ alert(sampleTime - document.timeline.currentTime);
7394
+ });
7395
+ </ pre > </ div >
7405
7396
7406
7397
</ div >
7407
7398
0 commit comments