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

Commit a68c265

Browse files
committed
Merge pull request #30 from shans/preInList
Temporary workaround for <pre> inside <div>.
2 parents 0849f1e + dacf6fb commit a68c265

File tree

1 file changed

+44
-53
lines changed

1 file changed

+44
-53
lines changed

Overview.src.html

Lines changed: 44 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -5215,11 +5215,9 @@ <h3 id="the-animationnode-interface">The <code>AnimationNode</code> interface</h
52155215
Note that this definition precludes the following usage since
52165216
<code>node</code> is an <a>inclusive ancestor</a> of itself:
52175217

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>
52235221
</div>
52245222

52255223
: <dfn method for=AnimationNode title='after()'>
@@ -6268,16 +6266,16 @@ <h3 id="the-animatable-interface">The <code>Animatable</code> interface</h3>
62686266

62696267
The following code fragment:
62706268

6271-
FIXME: <div class="example sh_javascript">
6269+
<div><pre class="example sh_javascript">
62726270
var anim = elem.animate({ opacity: 0 }, 2000);
6273-
</div>
6271+
</pre></div>
62746272

62756273
is equivalent to:
62766274

6277-
FIXME: <div class="example sh_javascript">
6275+
<div><pre class="example sh_javascript">
62786276
var anim = new Animation(elem, { opacity: 0 }, 2000);
62796277
elem.ownerDocument.timeline.play(anim);
6280-
</div>
6278+
</pre></div>
62816279

62826280
Returns the {{AnimationPlayer}} object returned by the
62836281
<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
72447242
animation's <code>startTime</code> will reflect updated state of
72457243
the model immediately.
72467244

7247-
FIXME: <div class="example sh_javascript">
7245+
<div><pre class="example sh_javascript">
72487246
// Initially player.src.localTime is 3000
72497247
player.currentTime += 2000;
72507248
alert(player.src.localTime); // Displays &lsquo;5000&rsquo;
7251-
7252-
</div>
7249+
</pre></div>
72537250

72547251
The same concept applies to more complex modifications of the
72557252
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
72707267
element, the result of the new animation will be
72717268
incorporated in the value returned.
72727269

7273-
FIXME: <div class="example sh_javascript">
7274-
// Set opacity to 0 immediately
7275-
elem.animate({ opacity: 0 }, { fill: &lsquo;forwards&rsquo; });
7276-
alert(window.getComputedStyle(elem).opacity); // Displays &lsquo;0&rsquo;
7277-
7278-
</div>
7270+
<div><pre class="example sh_javascript">
7271+
// Set opacity to 0 immediately
7272+
elem.animate({ opacity: 0 }, { fill: &lsquo;forwards&rsquo; });
7273+
alert(window.getComputedStyle(elem).opacity); // Displays &lsquo;0&rsquo;
7274+
</pre></div>
72797275

72807276
The means of querying the animated value of an attribute depends
72817277
on the interface defined for the attribute.
72827278
SVG 1.1 [[!SVG11]] defines an additional interface for querying
72837279
animated values.
72847280

7285-
FIXME: <div class="example sh_javascript">
7286-
// Set width to 0 immediately
7287-
rect.animate({ width: &lsquo;100px&rsquo; }, { fill: &lsquo;forwards&rsquo; });
7288-
alert(rect.width.animVal.value); // Displays &lsquo;100&rsquo;
7289-
7290-
</div>
7281+
<div><pre class="example sh_javascript">
7282+
// Set width to 0 immediately
7283+
rect.animate({ width: &lsquo;100px&rsquo; }, { fill: &lsquo;forwards&rsquo; });
7284+
alert(rect.width.animVal.value); // Displays &lsquo;100&rsquo;
7285+
</pre></div>
72917286

72927287
</div>
72937288

@@ -7301,14 +7296,13 @@ <h3 id="script-execution-and-live-updates-to-the-model">Script execution and liv
73017296
not be called until <em>after</em> the script block has
73027297
completed during regular sampling.
73037298

7304-
FIXME: <div class="example sh_javascript">
7305-
var timesCalled = 0;
7306-
elem.animate(function() {
7307-
timesCalled++;
7308-
}, 10000);
7309-
alert(timesCalled); // Displays &lsquo;0&rsquo;
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 &lsquo;0&rsquo;
7305+
</pre></div>
73127306

73137307
</div>
73147308

@@ -7327,13 +7321,12 @@ <h3 id="script-execution-and-live-updates-to-the-model">Script execution and liv
73277321
a situation where <em>only</em> the change to specified style is
73287322
rendered without the animation.
73297323

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 = &lsquo;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 = &lsquo;0&rqsuo;
7328+
elem.animate([ { opacity: 1 }, { opacity: 0 } ], 500);
7329+
</pre></div>
73377330

73387331
Note that a user agent may render a frame with <em>none</em> of
73397332
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
73537346
a long block of code that is executed in the same script block
73547347
will return the same value as shown in the following example.
73557348

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>
73637355

73647356
</div>
73657357

@@ -7395,13 +7387,12 @@ <h3 id="script-execution-and-live-updates-to-the-model">Script execution and liv
73957387
a <code>requestAnimationFrame</code> callback acts as
73967388
an alias for <code>document.timeline.currentTime</code>.
73977389

7398-
FIXME: <div class="example sh_javascript">
7399-
window.requestAnimationFrame(function(sampleTime) {
7400-
// Displays &lsquo;0&rsquo;
7401-
alert(sampleTime - document.timeline.currentTime);
7402-
});
7403-
7404-
</div>
7390+
<div><pre class="example sh_javascript">
7391+
window.requestAnimationFrame(function(sampleTime) {
7392+
// Displays &lsquo;0&rsquo;
7393+
alert(sampleTime - document.timeline.currentTime);
7394+
});
7395+
</pre></div>
74057396

74067397
</div>
74077398

0 commit comments

Comments
 (0)