[html5] r6492 - [e] (0) Explain ordering of setTimeout() calls better Fixing http://www.w3.org/B [...]

whatwg at whatwg.org whatwg at whatwg.org
Wed Aug 17 14:36:19 PDT 2011


Author: ianh
Date: 2011-08-17 14:36:17 -0700 (Wed, 17 Aug 2011)
New Revision: 6492

Modified:
   complete.html
   index
   source
Log:
[e] (0) Explain ordering of setTimeout() calls better
Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=13095

Modified: complete.html
===================================================================
--- complete.html	2011-08-17 21:26:33 UTC (rev 6491)
+++ complete.html	2011-08-17 21:36:17 UTC (rev 6492)
@@ -69484,10 +69484,33 @@
 
    </li>
 
-   <li><p>Wait until any invocations of this algorithm started before
-   this one whose <var title="">timeout</var> is equal to or less than
-   this one's have completed.</li>
+   <li>
 
+    <p>Wait until any invocations of this algorithm started before
+    this one whose <var title="">timeout</var> is equal to or less
+    than this one's have completed.</p>
+
+    <p class=note>Argument conversion as defined by WebIDL (for
+    example, invoking <code title="">toString()</code> methods on
+    objects passed as the first argument) happens in the algorithms
+    defined in WebIDL, before this algorithm is invoked.</p>
+
+    <div class=example>
+
+     <p>So for example, the following rather silly code will result in
+     the log containing "<code title="">ONE TWO </code>":</p>
+
+     <pre>var log = '';
+function logger(s) { log += s + ' '; }
+
+setTimeout({ toString: function () {
+  setTimeout("logger('ONE')", 100);
+  return "logger('TWO')";
+} }, 100);</pre>
+
+
+   
+
    <li>
 
     <p>Optionally, wait a further user-agent defined length of
@@ -69505,7 +69528,9 @@
 
    <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>
+  
+
+  <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,
@@ -102503,4 +102528,4 @@
           hand corner." src="sample-datetime-ui-3"></li>
 -->
 
- 
+ </ol></div>

Modified: index
===================================================================
--- index	2011-08-17 21:26:33 UTC (rev 6491)
+++ index	2011-08-17 21:36:17 UTC (rev 6492)
@@ -69374,10 +69374,33 @@
 
    </li>
 
-   <li><p>Wait until any invocations of this algorithm started before
-   this one whose <var title="">timeout</var> is equal to or less than
-   this one's have completed.</li>
+   <li>
 
+    <p>Wait until any invocations of this algorithm started before
+    this one whose <var title="">timeout</var> is equal to or less
+    than this one's have completed.</p>
+
+    <p class=note>Argument conversion as defined by WebIDL (for
+    example, invoking <code title="">toString()</code> methods on
+    objects passed as the first argument) happens in the algorithms
+    defined in WebIDL, before this algorithm is invoked.</p>
+
+    <div class=example>
+
+     <p>So for example, the following rather silly code will result in
+     the log containing "<code title="">ONE TWO </code>":</p>
+
+     <pre>var log = '';
+function logger(s) { log += s + ' '; }
+
+setTimeout({ toString: function () {
+  setTimeout("logger('ONE')", 100);
+  return "logger('TWO')";
+} }, 100);</pre>
+
+
+   
+
    <li>
 
     <p>Optionally, wait a further user-agent defined length of
@@ -69395,7 +69418,9 @@
 
    <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>
+  
+
+  <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,
@@ -98102,4 +98127,4 @@
           hand corner." src="sample-datetime-ui-3"></li>
 -->
 
- 
+ </ol></div>

Modified: source
===================================================================
--- source	2011-08-17 21:26:33 UTC (rev 6491)
+++ source	2011-08-17 21:36:17 UTC (rev 6492)
@@ -79026,10 +79026,34 @@
 
    </li>
 
-   <li><p>Wait until any invocations of this algorithm started before
-   this one whose <var title="">timeout</var> is equal to or less than
-   this one's have completed.</p></li>
+   <li>
 
+    <p>Wait until any invocations of this algorithm started before
+    this one whose <var title="">timeout</var> is equal to or less
+    than this one's have completed.</p>
+
+    <p class="note">Argument conversion as defined by WebIDL (for
+    example, invoking <code title="">toString()</code> methods on
+    objects passed as the first argument) happens in the algorithms
+    defined in WebIDL, before this algorithm is invoked.</p>
+
+    <div class="example">
+
+     <p>So for example, the following rather silly code will result in
+     the log containing "<code
+     title="">ONE TWO </code>":</p>
+
+     <pre>var log = '';
+function logger(s) { log += s + ' '; }
+
+setTimeout({ toString: function () {
+  setTimeout("logger('ONE')", 100);
+  return "logger('TWO')";
+} }, 100);</pre>
+
+
+   </li>
+
    <li>
 
     <p>Optionally, wait a further user-agent defined length of




More information about the Commit-Watchers mailing list