Skip to content
Permalink
Browse files

[giow] (3) Turns out clearTimeout() and clearInterval() are synonyms!…

… Who knew? Oh what a tangled Web we weave.

Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=14907
Affected topics: HTML, Web Workers

git-svn-id: http://svn.whatwg.org/webapps@6949 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information...
Hixie committed Jan 31, 2012
1 parent fe753db commit cc36e6d0736e351773973a8cec439ddde785ddde
Showing with 90 additions and 117 deletions.
  1. +30 −40 complete.html
  2. +30 −40 index
  3. +30 −37 source

<li><p>If the <code><a href=#document>Document</a></code>'s <var title=concept-document-salvageable><a href=#concept-document-salvageable>salvageable</a></var> state is
false, empty the <code><a href=#document>Document</a></code>'s <code><a href=#window>Window</a></code>'s
<a href=#list-of-active-timeouts>list of active timeouts</a> and its <a href=#list-of-active-intervals>list of active
intervals</a>.</li>
<a href=#list-of-active-timers>list of active timers</a>.</li>

</ol><h5 id=event-definition><span class=secno>6.5.11.1 </span>Event definition</h5>

</p>

<p>Each object that implements the <code><a href=#windowtimers>WindowTimers</a></code>
interface has a <dfn id=list-of-active-timeouts>list of active timeouts</dfn> and a <dfn id=list-of-active-intervals>list
of active intervals</dfn>. Each entry in these lists is identified
by a number, which must be unique within its list for the lifetime
of the object that implements the <code><a href=#windowtimers>WindowTimers</a></code>
interface.</p>
interface has a <dfn id=list-of-active-timers>list of active timers</dfn>. Each entry in this
lists is identified by a number, which must be unique within the
list for the lifetime of the object that implements the
<code><a href=#windowtimers>WindowTimers</a></code> interface.</p>

<hr><p>The <dfn id=dom-windowtimers-settimeout title=dom-windowtimers-setTimeout><code>setTimeout()</code></dfn>
method must run the following steps:

<ol><li><p>Let <var title="">handle</var> be a user-agent-defined integer
that is greater than zero that will identify the timeout to be set
by this call.</li>
<ol><li><p>Let <var title="">handle</var> be a user-agent-defined
integer that is greater than zero that will identify the timeout to
be set by this call in the <a href=#list-of-active-timers>list of active
timers</a>.</li>

<li><p>Add an entry to the <a href=#list-of-active-timeouts>list of active timeouts</a> for
<li><p>Add an entry to the <a href=#list-of-active-timers>list of active timers</a> for
<var title="">handle</var>.</li>

<li><p><a href=#get-the-timed-task>Get the timed task</a> <var title="">handle</var> in
the <a href=#list-of-active-timeouts>list of active timeouts</a>, and let <var title="">task</var> be the result.</li>
<li><p><a href=#get-the-timed-task>Get the timed task</a> <var title="">handle</var>
in the <a href=#list-of-active-timers>list of active timers</a>, and let <var title="">task</var> be the result.</li>

<li><p>Let <var title="">timeout</var> be the second argument to
the method, or zero if the argument was omitted.</li>

<li><p><a href=#queue-a-task title="queue a task">Queue</a> the <var title="">task</var> <a href=#concept-task title=concept-task>task</a>.</li>

</ol><p>The <dfn id=dom-windowtimers-cleartimeout title=dom-windowtimers-clearTimeout><code>clearTimeout()</code></dfn>
method must clear the entry identified as <var title="">handle</var>
from the <a href=#list-of-active-timeouts>list of active timeouts</a> of the
<code><a href=#windowtimers>WindowTimers</a></code> object on which the method was invoked,
where <var title="">handle</var> is the argument passed to the
method, if any. (If <var title="">handle</var> does not identify an
entry in the <a href=#list-of-active-timeouts>list of active timeouts</a> of the
<code><a href=#windowtimers>WindowTimers</a></code> object on which the method was invoked,
the method does nothing.)</p>

<hr><p>The <dfn id=dom-windowtimers-setinterval title=dom-windowtimers-setInterval><code>setInterval()</code></dfn>
</ol><hr><p>The <dfn id=dom-windowtimers-setinterval title=dom-windowtimers-setInterval><code>setInterval()</code></dfn>
method must run the following steps:

<ol><li><p>Let <var title="">handle</var> be a user-agent-defined integer
that is greater than zero that will identify the interval to be set
by this call.</li>
<ol><li><p>Let <var title="">handle</var> be a user-agent-defined
integer that is greater than zero that will identify the timeout to
be set by this call in the <a href=#list-of-active-timers>list of active
timers</a>.</li>

<li><p>Add an entry to the <a href=#list-of-active-intervals>list of active intervals</a> for
<li><p>Add an entry to the <a href=#list-of-active-timers>list of active timers</a> for
<var title="">handle</var>.</li>

<li><p><a href=#get-the-timed-task>Get the timed task</a> <var title="">handle</var> in
the <a href=#list-of-active-intervals>list of active intervals</a>, and let <var title="">task</var> be the result.</li>
<li><p><a href=#get-the-timed-task>Get the timed task</a> <var title="">handle</var>
in the <a href=#list-of-active-timers>list of active timers</a>, and let <var title="">task</var> be the result.</li>

<li><p>Let <var title="">timeout</var> be the second argument to
the method, or zero if the argument was omitted.</li>

<li><p>Return to the step labeled <i>wait</i>.</li>

</ol><p>The <dfn id=dom-windowtimers-clearinterval title=dom-windowtimers-clearInterval><code>clearInterval()</code></dfn>
method must clear the entry identified as <var title="">handle</var>
from the <a href=#list-of-active-intervals>list of active intervals</a> of the
<code><a href=#windowtimers>WindowTimers</a></code> object on which the method was invoked,
where <var title="">handle</var> is the argument passed to the
method, if any. (If <var title="">handle</var> does not identify an
entry in the <a href=#list-of-active-intervals>list of active intervals</a> of the
</ol><hr><p>The <dfn id=dom-windowtimers-cleartimeout title=dom-windowtimers-clearTimeout><code>clearTimeout()</code></dfn>
and <dfn id=dom-windowtimers-clearinterval title=dom-windowtimers-clearInterval><code>clearInterval()</code></dfn>
methods must clear the entry identified as <var title="">handle</var> from the <a href=#list-of-active-timers>list of active timers</a> of
the <code><a href=#windowtimers>WindowTimers</a></code> object on which the method was
invoked, where <var title="">handle</var> is the argument passed to
the method, if any. (If <var title="">handle</var> does not identify
an entry in the <a href=#list-of-active-timers>list of active timers</a> of the
<code><a href=#windowtimers>WindowTimers</a></code> object on which the method was invoked,
the method does nothing.)</p>


<li>

<p>Empty the <var title="">worker global scope</var>'s <a href=#list-of-active-timeouts>list
of active timeouts</a> and its <a href=#list-of-active-intervals>list of active
intervals</a>.</p>
<p>Empty the <var title="">worker global scope</var>'s <a href=#list-of-active-timers>list
of active timers</a> and its <span>list of active
intervals</span>.</p>

</li>

70 index

<li><p>If the <code><a href=#document>Document</a></code>'s <var title=concept-document-salvageable><a href=#concept-document-salvageable>salvageable</a></var> state is
false, empty the <code><a href=#document>Document</a></code>'s <code><a href=#window>Window</a></code>'s
<a href=#list-of-active-timeouts>list of active timeouts</a> and its <a href=#list-of-active-intervals>list of active
intervals</a>.</li>
<a href=#list-of-active-timers>list of active timers</a>.</li>

</ol><h5 id=event-definition><span class=secno>6.5.11.1 </span>Event definition</h5>

</p>

<p>Each object that implements the <code><a href=#windowtimers>WindowTimers</a></code>
interface has a <dfn id=list-of-active-timeouts>list of active timeouts</dfn> and a <dfn id=list-of-active-intervals>list
of active intervals</dfn>. Each entry in these lists is identified
by a number, which must be unique within its list for the lifetime
of the object that implements the <code><a href=#windowtimers>WindowTimers</a></code>
interface.</p>
interface has a <dfn id=list-of-active-timers>list of active timers</dfn>. Each entry in this
lists is identified by a number, which must be unique within the
list for the lifetime of the object that implements the
<code><a href=#windowtimers>WindowTimers</a></code> interface.</p>

<hr><p>The <dfn id=dom-windowtimers-settimeout title=dom-windowtimers-setTimeout><code>setTimeout()</code></dfn>
method must run the following steps:

<ol><li><p>Let <var title="">handle</var> be a user-agent-defined integer
that is greater than zero that will identify the timeout to be set
by this call.</li>
<ol><li><p>Let <var title="">handle</var> be a user-agent-defined
integer that is greater than zero that will identify the timeout to
be set by this call in the <a href=#list-of-active-timers>list of active
timers</a>.</li>

<li><p>Add an entry to the <a href=#list-of-active-timeouts>list of active timeouts</a> for
<li><p>Add an entry to the <a href=#list-of-active-timers>list of active timers</a> for
<var title="">handle</var>.</li>

<li><p><a href=#get-the-timed-task>Get the timed task</a> <var title="">handle</var> in
the <a href=#list-of-active-timeouts>list of active timeouts</a>, and let <var title="">task</var> be the result.</li>
<li><p><a href=#get-the-timed-task>Get the timed task</a> <var title="">handle</var>
in the <a href=#list-of-active-timers>list of active timers</a>, and let <var title="">task</var> be the result.</li>

<li><p>Let <var title="">timeout</var> be the second argument to
the method, or zero if the argument was omitted.</li>

<li><p><a href=#queue-a-task title="queue a task">Queue</a> the <var title="">task</var> <a href=#concept-task title=concept-task>task</a>.</li>

</ol><p>The <dfn id=dom-windowtimers-cleartimeout title=dom-windowtimers-clearTimeout><code>clearTimeout()</code></dfn>
method must clear the entry identified as <var title="">handle</var>
from the <a href=#list-of-active-timeouts>list of active timeouts</a> of the
<code><a href=#windowtimers>WindowTimers</a></code> object on which the method was invoked,
where <var title="">handle</var> is the argument passed to the
method, if any. (If <var title="">handle</var> does not identify an
entry in the <a href=#list-of-active-timeouts>list of active timeouts</a> of the
<code><a href=#windowtimers>WindowTimers</a></code> object on which the method was invoked,
the method does nothing.)</p>

<hr><p>The <dfn id=dom-windowtimers-setinterval title=dom-windowtimers-setInterval><code>setInterval()</code></dfn>
</ol><hr><p>The <dfn id=dom-windowtimers-setinterval title=dom-windowtimers-setInterval><code>setInterval()</code></dfn>
method must run the following steps:

<ol><li><p>Let <var title="">handle</var> be a user-agent-defined integer
that is greater than zero that will identify the interval to be set
by this call.</li>
<ol><li><p>Let <var title="">handle</var> be a user-agent-defined
integer that is greater than zero that will identify the timeout to
be set by this call in the <a href=#list-of-active-timers>list of active
timers</a>.</li>

<li><p>Add an entry to the <a href=#list-of-active-intervals>list of active intervals</a> for
<li><p>Add an entry to the <a href=#list-of-active-timers>list of active timers</a> for
<var title="">handle</var>.</li>

<li><p><a href=#get-the-timed-task>Get the timed task</a> <var title="">handle</var> in
the <a href=#list-of-active-intervals>list of active intervals</a>, and let <var title="">task</var> be the result.</li>
<li><p><a href=#get-the-timed-task>Get the timed task</a> <var title="">handle</var>
in the <a href=#list-of-active-timers>list of active timers</a>, and let <var title="">task</var> be the result.</li>

<li><p>Let <var title="">timeout</var> be the second argument to
the method, or zero if the argument was omitted.</li>

<li><p>Return to the step labeled <i>wait</i>.</li>

</ol><p>The <dfn id=dom-windowtimers-clearinterval title=dom-windowtimers-clearInterval><code>clearInterval()</code></dfn>
method must clear the entry identified as <var title="">handle</var>
from the <a href=#list-of-active-intervals>list of active intervals</a> of the
<code><a href=#windowtimers>WindowTimers</a></code> object on which the method was invoked,
where <var title="">handle</var> is the argument passed to the
method, if any. (If <var title="">handle</var> does not identify an
entry in the <a href=#list-of-active-intervals>list of active intervals</a> of the
</ol><hr><p>The <dfn id=dom-windowtimers-cleartimeout title=dom-windowtimers-clearTimeout><code>clearTimeout()</code></dfn>
and <dfn id=dom-windowtimers-clearinterval title=dom-windowtimers-clearInterval><code>clearInterval()</code></dfn>
methods must clear the entry identified as <var title="">handle</var> from the <a href=#list-of-active-timers>list of active timers</a> of
the <code><a href=#windowtimers>WindowTimers</a></code> object on which the method was
invoked, where <var title="">handle</var> is the argument passed to
the method, if any. (If <var title="">handle</var> does not identify
an entry in the <a href=#list-of-active-timers>list of active timers</a> of the
<code><a href=#windowtimers>WindowTimers</a></code> object on which the method was invoked,
the method does nothing.)</p>


<li>

<p>Empty the <var title="">worker global scope</var>'s <a href=#list-of-active-timeouts>list
of active timeouts</a> and its <a href=#list-of-active-intervals>list of active
intervals</a>.</p>
<p>Empty the <var title="">worker global scope</var>'s <a href=#list-of-active-timers>list
of active timers</a> and its <span>list of active
intervals</span>.</p>

</li>

67 source
<li><p>If the <code>Document</code>'s <var
title="concept-document-salvageable">salvageable</var> state is
false, empty the <code>Document</code>'s <code>Window</code>'s
<span>list of active timeouts</span> and its <span>list of active
intervals</span>.</p></li>
<span>list of active timers</span>.</p></li>

</ol>

</p>

<p>Each object that implements the <code>WindowTimers</code>
interface has a <dfn>list of active timeouts</dfn> and a <dfn>list
of active intervals</dfn>. Each entry in these lists is identified
by a number, which must be unique within its list for the lifetime
of the object that implements the <code>WindowTimers</code>
interface.</p>
interface has a <dfn>list of active timers</dfn>. Each entry in this
lists is identified by a number, which must be unique within the
list for the lifetime of the object that implements the
<code>WindowTimers</code> interface.</p>

<hr>


<ol>

<li><p>Let <var title="">handle</var> be a user-agent-defined integer
that is greater than zero that will identify the timeout to be set
by this call.</p></li>
<li><p>Let <var title="">handle</var> be a user-agent-defined
integer that is greater than zero that will identify the timeout to
be set by this call in the <span>list of active
timers</span>.</p></li>

<li><p>Add an entry to the <span>list of active timeouts</span> for
<li><p>Add an entry to the <span>list of active timers</span> for
<var title="">handle</var>.</p></li>

<li><p><span>Get the timed task</span> <var title="">handle</var> in
the <span>list of active timeouts</span>, and let <var
<li><p><span>Get the timed task</span> <var title="">handle</var>
in the <span>list of active timers</span>, and let <var
title="">task</var> be the result.</p></li>

<li><p>Let <var title="">timeout</var> be the second argument to

</ol>

<p>The <dfn
title="dom-windowtimers-clearTimeout"><code>clearTimeout()</code></dfn>
method must clear the entry identified as <var title="">handle</var>
from the <span>list of active timeouts</span> of the
<code>WindowTimers</code> object on which the method was invoked,
where <var title="">handle</var> is the argument passed to the
method, if any. (If <var title="">handle</var> does not identify an
entry in the <span>list of active timeouts</span> of the
<code>WindowTimers</code> object on which the method was invoked,
the method does nothing.)</p>

<hr>

<p>The <dfn

<ol>

<li><p>Let <var title="">handle</var> be a user-agent-defined integer
that is greater than zero that will identify the interval to be set
by this call.</p></li>
<li><p>Let <var title="">handle</var> be a user-agent-defined
integer that is greater than zero that will identify the timeout to
be set by this call in the <span>list of active
timers</span>.</p></li>

<li><p>Add an entry to the <span>list of active intervals</span> for
<li><p>Add an entry to the <span>list of active timers</span> for
<var title="">handle</var>.</p></li>

<li><p><span>Get the timed task</span> <var title="">handle</var> in
the <span>list of active intervals</span>, and let <var
<li><p><span>Get the timed task</span> <var title="">handle</var>
in the <span>list of active timers</span>, and let <var
title="">task</var> be the result.</p></li>

<li><p>Let <var title="">timeout</var> be the second argument to

</ol>

<hr>

<p>The <dfn
title="dom-windowtimers-clearTimeout"><code>clearTimeout()</code></dfn>
and <dfn
title="dom-windowtimers-clearInterval"><code>clearInterval()</code></dfn>
method must clear the entry identified as <var title="">handle</var>
from the <span>list of active intervals</span> of the
<code>WindowTimers</code> object on which the method was invoked,
where <var title="">handle</var> is the argument passed to the
method, if any. (If <var title="">handle</var> does not identify an
entry in the <span>list of active intervals</span> of the
methods must clear the entry identified as <var
title="">handle</var> from the <span>list of active timers</span> of
the <code>WindowTimers</code> object on which the method was
invoked, where <var title="">handle</var> is the argument passed to
the method, if any. (If <var title="">handle</var> does not identify
an entry in the <span>list of active timers</span> of the
<code>WindowTimers</code> object on which the method was invoked,
the method does nothing.)</p>

<li>

<p>Empty the <var title="">worker global scope</var>'s <span>list
of active timeouts</span> and its <span>list of active
of active timers</span> and its <span>list of active
intervals</span>.</p>

</li>

0 comments on commit cc36e6d

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