Skip to content
Permalink
Browse files

[e] (0) Hyperlink to 'step 1' of the event loop

Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=25970
Affected topics: DOM APIs, HTML, Offline Web Applications, Video Text Tracks, Video and Audio

git-svn-id: https://svn.whatwg.org/webapps@8832 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information...
Hixie committed Oct 9, 2014
1 parent 5b47ead commit 53a37629de1acd753ece8e9045e742ac20e90c0d
Showing with 116 additions and 106 deletions.
  1. +45 −42 complete.html
  2. +45 −42 index
  3. +26 −22 source

Large diffs are not rendered by default.

87 index

Large diffs are not rendered by default.

48 source
data-x="rel-stylesheet">external resource link that contributes to the styling processing
model</span> when the element was created by the parser, and the element's style sheet was enabled
when the element was created by the parser, and the element's <span>style sheet ready</span> flag
is not yet set, and, the last time the <span>event loop</span> reached step 1, the element was
is not yet set, and, the last time the <span>event loop</span> reached <a href="#step1">step 1</a>, the element was
<span data-x="in a document">in that <code>Document</code></span>, and the user agent hasn't given
up on that particular style sheet yet. A user agent may give up on a style sheet at any time.</p>


<li>The element is <span data-x="in a document">in a <code>Document</code></span> or was <span
data-x="in a document">in a <code>Document</code></span> the last time the <span>event loop</span>
reached step 1.</li>
reached <a href="#step1">step 1</a>.</li>

<li>The element's <span>node document</span> is <span>fully active</span>.</li>

<span>fallback content</span>.</li>

<li>The element is <span>being rendered</span>, or was <span>being rendered</span> the last time
the <span>event loop</span> reached step 1.</li>
the <span>event loop</span> reached <a href="#step1">step 1</a>.</li>

</ul>


<p>Frames of video must be obtained from the video track that was <span
data-x="dom-VideoTrack-selected">selected</span> when the <span>event loop</span> last reached
step 1.</p>
<a href="#step1">step 1</a>.</p>

<p class="note">Which frame in a video stream corresponds to a particular playback position is
defined by the video stream's format.</p>
<p>When an <code>audio</code> element is <span>potentially playing</span>, it must have its audio
data played synchronised with the <span>current playback position</span>, at the element's
<span>effective media volume</span>. The user agent must play the audio from audio tracks that
were enabled when the <span>event loop</span> last reached step 1.</p>
were enabled when the <span>event loop</span> last reached <a href="#step1">step 1</a>.</p>

<p>When an <code>audio</code> element is not <span>potentially playing</span>, audio must not play
for the element.</p>
<span>media element</span>, the video data of the <span>media resource</span> is only that of the
currently selected track (if any) as given by the element's <code
data-x="dom-media-videoTracks">videoTracks</code> attribute when the <span>event loop</span> last
reached step 1, and the audio data of the <span>media resource</span> is the result of mixing all
reached <a href="#step1">step 1</a>, and the audio data of the <span>media resource</span> is the result of mixing all
the currently enabled tracks (if any) given by the element's <code
data-x="dom-media-audioTracks">audioTracks</code> attribute when the <span>event loop</span> last
reached step 1.</p>
reached <a href="#step1">step 1</a>.</p>

<p class="note">Both <code>audio</code> and <code>video</code> elements can be used for both audio
and video. The main difference between the two is simply that the <code>audio</code> element has
</ul>

<p>The <dfn><code data-x="dom-media-ended">ended</code></dfn> attribute must return true if, the
last time the <span>event loop</span> reached step 1, the <span>media element</span> had
last time the <span>event loop</span> reached <a href="#step1">step 1</a>, the <span>media element</span> had
<span>ended playback</span> and the <span>direction of playback</span> was forwards, and false
otherwise.</p>

doesn't fire in the loop case). -->

<li><p>As defined above, the <code data-x="dom-media-ended">ended</code> IDL attribute starts
returning true once the <span>event loop</span> returns to step 1.</p></li>
returning true once the <span>event loop</span> returns to <a href="#step1">step 1</a>.</p></li>

<li><p><span>Queue a task</span> to <span>fire a simple event</span> named <code
data-x="event-media-timeupdate">timeupdate</code> at the <span>media element</span>.</p></li>

<p>A <span>text track cue</span>'s <dfn>active flag was set when the script started</dfn> if its
<span>text track cue active flag</span> was set the last time the <span>event loop</span> reached
step 1.</p>
<a href="#step1">step 1</a>.</p>

<hr>


<p>When a <span>media element</span> that is paused is <span data-x="remove an element from a
document">removed from a document</span> and not reinserted before the next time the <span>event
loop</span> reaches step 1, implementations that are resource constrained are encouraged to take
loop</span> reaches <a href="#step1">step 1</a>, implementations that are resource constrained are encouraged to take
that opportunity to release all hardware resources (like video planes, networking resources, and
data buffers) used by the <span>media element</span>. (User agents still have to keep track of the
playback position and so forth, though, in case playback is later restarted.)</p>
</div>


<h4>Browser state</h4>
<h4 id="navigator.online">Browser state</h4>

<pre class="idl">[NoInterfaceObject, Exposed=(Window,Worker)]
interface <dfn>NavigatorOnLine</dfn> {

<!-- lots of places in the spec refer to "step 1" -->

<li><p>Select the oldest <span data-x="concept-task">task</span> on one of the <span>event
loop</span>'s <span data-x="task queue">task queues</span>, if any, ignoring, in the case of a
<span>browsing context</span> <span>event loop</span>, tasks whose associated
<code>Document</code>s are not <span>fully active</span>. The user agent may pick any <span>task
queue</span>.</p></li>
<li id="step1">

<p>Select the oldest <span data-x="concept-task">task</span> on one of the <span>event
loop</span>'s <span data-x="task queue">task queues</span>, if any, ignoring, in the case of a
<span>browsing context</span> <span>event loop</span>, tasks whose associated
<code>Document</code>s are not <span>fully active</span>. The user agent may pick any <span>task
queue</span>.</p>

</li>

<!-- note: reference to 'previous step' below -->

loop</span>, aborting these steps, resuming the <span>run a worker</span> steps described in the
Web Workers section below.</p></li>

<li><p>Return to the first step of the <span>event loop</span>.</p></li>
<li><p>Return to the <a href="#step1">first step</a> of the <span>event loop</span>.</p></li>

</ol>

<p>The <dfn><code data-x="dom-WebSocket-bufferedAmount">bufferedAmount</code></dfn> attribute must
return the number of bytes of application data (UTF-8 text and binary data) that have been queued
using <code data-x="dom-WebSocket-send">send()</code> but that, as of the last time the
<span>event loop</span> reached step 1, had not yet been transmitted to the network. (This thus
<span>event loop</span> reached <a href="#step1">step 1</a>, had not yet been transmitted to the network. (This thus
includes any text sent during the execution of the current task, regardless of whether the user
agent is able to transmit text in the background <span>in parallel</span> with script execution.) This does not include
framing overhead incurred by the protocol, or buffering done by the operating system or network

<p>A <code>WebSocket</code> object whose <code data-x="dom-WebSocket-readyState">readyState</code>
attribute's value was set to <code data-x="dom-WebSocket-CONNECTING">CONNECTING</code> (0) as of
the last time the <span>event loop</span> reached step 1 must not be garbage collected if there
the last time the <span>event loop</span> reached <a href="#step1">step 1</a> must not be garbage collected if there
are any event listeners registered for <code data-x="event-open">open</code> events, <code
data-x="event-message">message</code> events, <code data-x="event-error">error</code> events, or
<code data-x="event-close">close</code> events.</p>

<p>A <code>WebSocket</code> object whose <code data-x="dom-WebSocket-readyState">readyState</code>
attribute's value was set to <code data-x="dom-WebSocket-OPEN">OPEN</code> (1) as of the last time
the <span>event loop</span> reached step 1 must not be garbage collected if there are any event
the <span>event loop</span> reached <a href="#step1">step 1</a> must not be garbage collected if there are any event
listeners registered for <code data-x="event-message">message</code> events, <code
data-x="event-error">error</code>, or <code data-x="event-close">close</code> events.</p>

<p>A <code>WebSocket</code> object whose <code data-x="dom-WebSocket-readyState">readyState</code>
attribute's value was set to <code data-x="dom-WebSocket-CLOSING">CLOSING</code> (2) as of the
last time the <span>event loop</span> reached step 1 must not be garbage collected if there are
last time the <span>event loop</span> reached <a href="#step1">step 1</a> must not be garbage collected if there are
any event listeners registered for <code data-x="event-error">error</code> or <code
data-x="event-close">close</code> events.</p>

0 comments on commit 53a3762

Please sign in to comment.
You can’t perform that action at this time.