Skip to content

Commit

Permalink
[e] (0) example correctness
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.whatwg.org/webapps@4871 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Mar 26, 2010
1 parent 00d91c1 commit 6abcea9
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 32 deletions.
26 changes: 15 additions & 11 deletions complete.html
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@

<header class=head id=head><p><a class=logo href=http://www.whatwg.org/ rel=home><img alt=WHATWG src=/images/logo></a></p>
<hgroup><h1>Web Applications 1.0</h1>
<h2 class="no-num no-toc">Draft Standard &mdash; 25 March 2010</h2>
<h2 class="no-num no-toc">Draft Standard &mdash; 26 March 2010</h2>
</hgroup><p>You can take part in this work. <a href=http://www.whatwg.org/mailing-list>Join the working group's discussion list.</a></p>
<p><strong>Web designers!</strong> We have a <a href=http://blog.whatwg.org/faq/>FAQ</a>, a <a href=http://forums.whatwg.org/>forum</a>, and a <a href=http://www.whatwg.org/mailing-list#help>help mailing list</a> for you!</p>
<!--<p class="impl"><strong>Implementors!</strong> We have a <a href="http://www.whatwg.org/mailing-list#implementors">mailing list</a> for you too!</p>-->
Expand Down Expand Up @@ -22316,20 +22316,24 @@ <h4 id=the-source-element><span class=secno>4.8.8 </span>The <dfn><code>source</
<code title=event-error>error</code> event on the last
<code><a href=#the-source-element>source</a></code> element and trigger fallback behaviour:</p>

<pre>&lt;video controls autoplay&gt;
&lt;source src='video.mp4' type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"'&gt;
&lt;source src='video.ogv' type='video/ogg; codecs="theora, vorbis"'
onerror="fallback(parentNode)"&gt;
...
&lt;/video&gt;
&lt;script&gt;
<pre>&lt;script&gt;
function fallback(video) {
// replace &lt;video&gt; with its contents
while (video.hasChildNodes())
video.parentNode.insertBefore(video.firstChild, video);
while (video.hasChildNodes()) {
if (video.firstChild instanceof HTMLSourceElement)
video.removeChild(video.firstChild);
else
video.parentNode.insertBefore(video.firstChild, video);
}
video.parentNode.removeChild(video);
}
&lt;/script&gt;</pre>
&lt;/script&gt;
&lt;video controls autoplay&gt;
&lt;source src='video.mp4' type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"'&gt;
&lt;source src='video.ogv' type='video/ogg; codecs="theora, vorbis"'
onerror="fallback(parentNode)"&gt;
...
&lt;/video&gt;</pre>

</div>

Expand Down
26 changes: 15 additions & 11 deletions index
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@

<header class=head id=head><p><a class=logo href=http://www.whatwg.org/ rel=home><img alt=WHATWG src=/images/logo></a></p>
<hgroup><h1>HTML5 (including next generation additions still in development)</h1>
<h2 class="no-num no-toc">Draft Standard &mdash; 25 March 2010</h2>
<h2 class="no-num no-toc">Draft Standard &mdash; 26 March 2010</h2>
</hgroup><p>You can take part in this work. <a href=http://www.whatwg.org/mailing-list>Join the working group's discussion list.</a></p>
<p><strong>Web designers!</strong> We have a <a href=http://blog.whatwg.org/faq/>FAQ</a>, a <a href=http://forums.whatwg.org/>forum</a>, and a <a href=http://www.whatwg.org/mailing-list#help>help mailing list</a> for you!</p>
<!--<p class="impl"><strong>Implementors!</strong> We have a <a href="http://www.whatwg.org/mailing-list#implementors">mailing list</a> for you too!</p>-->
Expand Down Expand Up @@ -22217,20 +22217,24 @@ interface <dfn id=htmlaudioelement>HTMLAudioElement</dfn> : <a href=#htmlmediael
<code title=event-error>error</code> event on the last
<code><a href=#the-source-element>source</a></code> element and trigger fallback behaviour:</p>

<pre>&lt;video controls autoplay&gt;
&lt;source src='video.mp4' type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"'&gt;
&lt;source src='video.ogv' type='video/ogg; codecs="theora, vorbis"'
onerror="fallback(parentNode)"&gt;
...
&lt;/video&gt;
&lt;script&gt;
<pre>&lt;script&gt;
function fallback(video) {
// replace &lt;video&gt; with its contents
while (video.hasChildNodes())
video.parentNode.insertBefore(video.firstChild, video);
while (video.hasChildNodes()) {
if (video.firstChild instanceof HTMLSourceElement)
video.removeChild(video.firstChild);
else
video.parentNode.insertBefore(video.firstChild, video);
}
video.parentNode.removeChild(video);
}
&lt;/script&gt;</pre>
&lt;/script&gt;
&lt;video controls autoplay&gt;
&lt;source src='video.mp4' type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"'&gt;
&lt;source src='video.ogv' type='video/ogg; codecs="theora, vorbis"'
onerror="fallback(parentNode)"&gt;
...
&lt;/video&gt;</pre>

</div>

Expand Down
24 changes: 14 additions & 10 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -23851,20 +23851,24 @@ interface <dfn>HTMLAudioElement</dfn> : <span>HTMLMediaElement</span> {};</pre>
<code title="event-error">error</code> event on the last
<code>source</code> element and trigger fallback behaviour:</p>

<pre>&lt;video controls autoplay>
&lt;source src='video.mp4' type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"'>
&lt;source src='video.ogv' type='video/ogg; codecs="theora, vorbis"'
onerror="fallback(parentNode)">
...
&lt;/video>
&lt;script>
<pre>&lt;script>
function fallback(video) {
// replace &lt;video> with its contents
while (video.hasChildNodes())
video.parentNode.insertBefore(video.firstChild, video);
while (video.hasChildNodes()) {
if (video.firstChild instanceof HTMLSourceElement)
video.removeChild(video.firstChild);
else
video.parentNode.insertBefore(video.firstChild, video);
}
video.parentNode.removeChild(video);
}
&lt;/script></pre>
&lt;/script>
&lt;video controls autoplay>
&lt;source src='video.mp4' type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"'>
&lt;source src='video.ogv' type='video/ogg; codecs="theora, vorbis"'
onerror="fallback(parentNode)">
...
&lt;/video></pre>

</div>

Expand Down

0 comments on commit 6abcea9

Please sign in to comment.