[html5] r5827 - [e] (0) move the 'onerror' stuff up to script execution and away from the no-mor [...]

whatwg at whatwg.org whatwg at whatwg.org
Thu Feb 3 13:28:15 PST 2011


Author: ianh
Date: 2011-02-03 13:28:14 -0800 (Thu, 03 Feb 2011)
New Revision: 5827

Modified:
   complete.html
   index
   source
Log:
[e] (0) move the 'onerror' stuff up to script execution and away from the no-more-related events stuff
Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=11320

Modified: complete.html
===================================================================
--- complete.html	2011-02-03 21:15:19 UTC (rev 5826)
+++ complete.html	2011-02-03 21:28:14 UTC (rev 5827)
@@ -939,7 +939,8 @@
        <li><a href=#definitions-0><span class=secno>7.1.3.1 </span>Definitions</a></li>
        <li><a href=#calling-scripts><span class=secno>7.1.3.2 </span>Calling scripts</a></li>
        <li><a href=#creating-scripts><span class=secno>7.1.3.3 </span>Creating scripts</a></li>
-       <li><a href=#killing-scripts><span class=secno>7.1.3.4 </span>Killing scripts</a></ol></li>
+       <li><a href=#killing-scripts><span class=secno>7.1.3.4 </span>Killing scripts</a></li>
+       <li><a href=#runtime-script-errors><span class=secno>7.1.3.5 </span>Runtime script errors</a></ol></li>
      <li><a href=#event-loops><span class=secno>7.1.4 </span>Event loops</a>
       <ol>
        <li><a href=#definitions-1><span class=secno>7.1.4.1 </span>Definitions</a></li>
@@ -951,8 +952,7 @@
        <li><a href=#event-handler-attributes><span class=secno>7.1.6.1 </span>Event handlers</a></li>
        <li><a href=#event-handlers-on-elements,-document-objects,-and-window-objects><span class=secno>7.1.6.2 </span>Event handlers on elements, <code>Document</code> objects, and <code>Window</code> objects</a></li>
        <li><a href=#event-firing><span class=secno>7.1.6.3 </span>Event firing</a></li>
-       <li><a href=#events-and-the-window-object><span class=secno>7.1.6.4 </span>Events and the <code>Window</code> object</a></li>
-       <li><a href=#runtime-script-errors><span class=secno>7.1.6.5 </span>Runtime script errors</a></ol></ol></li>
+       <li><a href=#events-and-the-window-object><span class=secno>7.1.6.4 </span>Events and the <code>Window</code> object</a></ol></ol></li>
    <li><a href=#atob><span class=secno>7.2 </span>Base64 utility methods</a></li>
    <li><a href=#timers><span class=secno>7.3 </span>Timers</a></li>
    <li><a href=#user-prompts><span class=secno>7.4 </span>User prompts</a>
@@ -64202,6 +64202,56 @@
 
   <div class=impl>
 
+  <h5 id=runtime-script-errors><span class=secno>7.1.3.5 </span>Runtime script errors</h5>
+
+  <p>Whenever an uncaught runtime script error occurs in one of the
+  scripts associated with a <code><a href=#document>Document</a></code>, the user agent must
+  <a href=#report-the-error>report the error</a> using the <code title=handler-window-onerror><a href=#handler-window-onerror>onerror</a></code> <a href=#event-handlers title="event
+  handlers">event handler</a> of the <a href="#script's-global-object">script's global
+  object</a>. If the error is still <i title=concept-error-nothandled><a href=#concept-error-nothandled>not handled</a></i> after this, then
+  the error may be reported to the user.</p>
+
+  <hr><p>When the user agent is required to <dfn id=report-the-error title="report the
+  error">report an error</dfn> <var title="">error</var> using the
+  <a href=#event-handlers title="event handlers">event handler</a> <var title="">onerror</var>, it must run these steps, after which the
+  error is either <dfn id=concept-error-handled title=concept-error-handled><i>handled</i></dfn> or <dfn id=concept-error-nothandled title=concept-error-nothandled><i>not handled</i></dfn>:</p>
+
+  <dl class=switch><dt>If the value of <var title="">onerror</var> is a
+   <code><a href=#function>Function</a></code></dt>
+
+   <dd>
+
+    <p>The function must be invoked with three arguments. The three
+    arguments passed to the function are all <code>DOMString</code>s;
+    the first must give the message that the UA is considering
+    reporting, the second must give the <a href=#absolute-url>absolute URL</a> of
+    the resource in which the error occurred, and the third must give
+    the line number in that resource on which the error occurred.</p>
+
+    <p>If the function returns false, then the error is <i title=concept-error-handled><a href=#concept-error-handled>handled</a></i>. Otherwise, the error is
+    <i title=concept-error-nothandled><a href=#concept-error-nothandled>not handled</a></i>.</p>
+
+    <p>Any uncaught exceptions thrown or errors caused by this
+    function may be reported to the user immediately after the error
+    that the function was called for; the <a href=#report-the-error title="report the
+    error">report an error</a> algorithm must not be used to handle
+    exceptions thrown or errors caused by this function.</p>
+
+   </dd>
+
+   <dt>Otherwise</dt>
+
+   <dd>
+
+    <p>The error is <i title=concept-error-nothandled><a href=#concept-error-nothandled>not handled</a></i>.</p>
+
+   </dd>
+
+  </dl></div>
+
+
+  <div class=impl>
+
   <h4 id=event-loops><span class=secno>7.1.4 </span>Event loops</h4>
 
   <h5 id=definitions-1><span class=secno>7.1.4.1 </span>Definitions</h5>
@@ -65049,59 +65099,7 @@
   </ol></div>
 
 
-  <div class=impl>
 
-  <h5 id=runtime-script-errors><span class=secno>7.1.6.5 </span>Runtime script errors</h5>
-
-  <p><i>This section only applies to user agents that support
-  scripting in general and JavaScript in particular.</i></p>
-
-  <p>Whenever an uncaught runtime script error occurs in one of the
-  scripts associated with a <code><a href=#document>Document</a></code>, the user agent must
-  <a href=#report-the-error>report the error</a> using the <code title=handler-window-onerror><a href=#handler-window-onerror>onerror</a></code> <a href=#event-handlers title="event
-  handlers">event handler</a> of the <a href="#script's-global-object">script's global
-  object</a>. If the error is still <i title=concept-error-nothandled><a href=#concept-error-nothandled>not handled</a></i> after this, then
-  the error may be reported to the user.</p>
-
-  <hr><p>When the user agent is required to <dfn id=report-the-error title="report the
-  error">report an error</dfn> <var title="">error</var> using the
-  <a href=#event-handlers title="event handlers">event handler</a> <var title="">onerror</var>, it must run these steps, after which the
-  error is either <dfn id=concept-error-handled title=concept-error-handled><i>handled</i></dfn> or <dfn id=concept-error-nothandled title=concept-error-nothandled><i>not handled</i></dfn>:</p>
-
-  <dl class=switch><dt>If the value of <var title="">onerror</var> is a
-   <code><a href=#function>Function</a></code></dt>
-
-   <dd>
-
-    <p>The function must be invoked with three arguments. The three
-    arguments passed to the function are all <code>DOMString</code>s;
-    the first must give the message that the UA is considering
-    reporting, the second must give the <a href=#absolute-url>absolute URL</a> of
-    the resource in which the error occurred, and the third must give
-    the line number in that resource on which the error occurred.</p>
-
-    <p>If the function returns false, then the error is <i title=concept-error-handled><a href=#concept-error-handled>handled</a></i>. Otherwise, the error is
-    <i title=concept-error-nothandled><a href=#concept-error-nothandled>not handled</a></i>.</p>
-
-    <p>Any uncaught exceptions thrown or errors caused by this
-    function may be reported to the user immediately after the error
-    that the function was called for; the <a href=#report-the-error title="report the
-    error">report an error</a> algorithm must not be used to handle
-    exceptions thrown or errors caused by this function.</p>
-
-   </dd>
-
-   <dt>Otherwise</dt>
-
-   <dd>
-
-    <p>The error is <i title=concept-error-nothandled><a href=#concept-error-nothandled>not handled</a></i>.</p>
-
-   </dd>
-
-  </dl></div>
-
-
   <h3 id=atob><span class=secno>7.2 </span>Base64 utility methods</h3>
 
   <p>The <code title=dom-windowbase64-atob><a href=#dom-windowbase64-atob>atob()</a></code> and <code title=dom-windowbase64-btoa><a href=#dom-windowbase64-btoa>btoa()</a></code> methods allow authors to

Modified: index
===================================================================
--- index	2011-02-03 21:15:19 UTC (rev 5826)
+++ index	2011-02-03 21:28:14 UTC (rev 5827)
@@ -947,7 +947,8 @@
        <li><a href=#definitions-0><span class=secno>7.1.3.1 </span>Definitions</a></li>
        <li><a href=#calling-scripts><span class=secno>7.1.3.2 </span>Calling scripts</a></li>
        <li><a href=#creating-scripts><span class=secno>7.1.3.3 </span>Creating scripts</a></li>
-       <li><a href=#killing-scripts><span class=secno>7.1.3.4 </span>Killing scripts</a></ol></li>
+       <li><a href=#killing-scripts><span class=secno>7.1.3.4 </span>Killing scripts</a></li>
+       <li><a href=#runtime-script-errors><span class=secno>7.1.3.5 </span>Runtime script errors</a></ol></li>
      <li><a href=#event-loops><span class=secno>7.1.4 </span>Event loops</a>
       <ol>
        <li><a href=#definitions-1><span class=secno>7.1.4.1 </span>Definitions</a></li>
@@ -959,8 +960,7 @@
        <li><a href=#event-handler-attributes><span class=secno>7.1.6.1 </span>Event handlers</a></li>
        <li><a href=#event-handlers-on-elements,-document-objects,-and-window-objects><span class=secno>7.1.6.2 </span>Event handlers on elements, <code>Document</code> objects, and <code>Window</code> objects</a></li>
        <li><a href=#event-firing><span class=secno>7.1.6.3 </span>Event firing</a></li>
-       <li><a href=#events-and-the-window-object><span class=secno>7.1.6.4 </span>Events and the <code>Window</code> object</a></li>
-       <li><a href=#runtime-script-errors><span class=secno>7.1.6.5 </span>Runtime script errors</a></ol></ol></li>
+       <li><a href=#events-and-the-window-object><span class=secno>7.1.6.4 </span>Events and the <code>Window</code> object</a></ol></ol></li>
    <li><a href=#atob><span class=secno>7.2 </span>Base64 utility methods</a></li>
    <li><a href=#timers><span class=secno>7.3 </span>Timers</a></li>
    <li><a href=#user-prompts><span class=secno>7.4 </span>User prompts</a>
@@ -64199,6 +64199,56 @@
 
   <div class=impl>
 
+  <h5 id=runtime-script-errors><span class=secno>7.1.3.5 </span>Runtime script errors</h5>
+
+  <p>Whenever an uncaught runtime script error occurs in one of the
+  scripts associated with a <code><a href=#document>Document</a></code>, the user agent must
+  <a href=#report-the-error>report the error</a> using the <code title=handler-window-onerror><a href=#handler-window-onerror>onerror</a></code> <a href=#event-handlers title="event
+  handlers">event handler</a> of the <a href="#script's-global-object">script's global
+  object</a>. If the error is still <i title=concept-error-nothandled><a href=#concept-error-nothandled>not handled</a></i> after this, then
+  the error may be reported to the user.</p>
+
+  <hr><p>When the user agent is required to <dfn id=report-the-error title="report the
+  error">report an error</dfn> <var title="">error</var> using the
+  <a href=#event-handlers title="event handlers">event handler</a> <var title="">onerror</var>, it must run these steps, after which the
+  error is either <dfn id=concept-error-handled title=concept-error-handled><i>handled</i></dfn> or <dfn id=concept-error-nothandled title=concept-error-nothandled><i>not handled</i></dfn>:</p>
+
+  <dl class=switch><dt>If the value of <var title="">onerror</var> is a
+   <code><a href=#function>Function</a></code></dt>
+
+   <dd>
+
+    <p>The function must be invoked with three arguments. The three
+    arguments passed to the function are all <code>DOMString</code>s;
+    the first must give the message that the UA is considering
+    reporting, the second must give the <a href=#absolute-url>absolute URL</a> of
+    the resource in which the error occurred, and the third must give
+    the line number in that resource on which the error occurred.</p>
+
+    <p>If the function returns false, then the error is <i title=concept-error-handled><a href=#concept-error-handled>handled</a></i>. Otherwise, the error is
+    <i title=concept-error-nothandled><a href=#concept-error-nothandled>not handled</a></i>.</p>
+
+    <p>Any uncaught exceptions thrown or errors caused by this
+    function may be reported to the user immediately after the error
+    that the function was called for; the <a href=#report-the-error title="report the
+    error">report an error</a> algorithm must not be used to handle
+    exceptions thrown or errors caused by this function.</p>
+
+   </dd>
+
+   <dt>Otherwise</dt>
+
+   <dd>
+
+    <p>The error is <i title=concept-error-nothandled><a href=#concept-error-nothandled>not handled</a></i>.</p>
+
+   </dd>
+
+  </dl></div>
+
+
+  <div class=impl>
+
   <h4 id=event-loops><span class=secno>7.1.4 </span>Event loops</h4>
 
   <h5 id=definitions-1><span class=secno>7.1.4.1 </span>Definitions</h5>
@@ -65051,59 +65101,7 @@
   </ol></div>
 
 
-  <div class=impl>
 
-  <h5 id=runtime-script-errors><span class=secno>7.1.6.5 </span>Runtime script errors</h5>
-
-  <p><i>This section only applies to user agents that support
-  scripting in general and JavaScript in particular.</i></p>
-
-  <p>Whenever an uncaught runtime script error occurs in one of the
-  scripts associated with a <code><a href=#document>Document</a></code>, the user agent must
-  <a href=#report-the-error>report the error</a> using the <code title=handler-window-onerror><a href=#handler-window-onerror>onerror</a></code> <a href=#event-handlers title="event
-  handlers">event handler</a> of the <a href="#script's-global-object">script's global
-  object</a>. If the error is still <i title=concept-error-nothandled><a href=#concept-error-nothandled>not handled</a></i> after this, then
-  the error may be reported to the user.</p>
-
-  <hr><p>When the user agent is required to <dfn id=report-the-error title="report the
-  error">report an error</dfn> <var title="">error</var> using the
-  <a href=#event-handlers title="event handlers">event handler</a> <var title="">onerror</var>, it must run these steps, after which the
-  error is either <dfn id=concept-error-handled title=concept-error-handled><i>handled</i></dfn> or <dfn id=concept-error-nothandled title=concept-error-nothandled><i>not handled</i></dfn>:</p>
-
-  <dl class=switch><dt>If the value of <var title="">onerror</var> is a
-   <code><a href=#function>Function</a></code></dt>
-
-   <dd>
-
-    <p>The function must be invoked with three arguments. The three
-    arguments passed to the function are all <code>DOMString</code>s;
-    the first must give the message that the UA is considering
-    reporting, the second must give the <a href=#absolute-url>absolute URL</a> of
-    the resource in which the error occurred, and the third must give
-    the line number in that resource on which the error occurred.</p>
-
-    <p>If the function returns false, then the error is <i title=concept-error-handled><a href=#concept-error-handled>handled</a></i>. Otherwise, the error is
-    <i title=concept-error-nothandled><a href=#concept-error-nothandled>not handled</a></i>.</p>
-
-    <p>Any uncaught exceptions thrown or errors caused by this
-    function may be reported to the user immediately after the error
-    that the function was called for; the <a href=#report-the-error title="report the
-    error">report an error</a> algorithm must not be used to handle
-    exceptions thrown or errors caused by this function.</p>
-
-   </dd>
-
-   <dt>Otherwise</dt>
-
-   <dd>
-
-    <p>The error is <i title=concept-error-nothandled><a href=#concept-error-nothandled>not handled</a></i>.</p>
-
-   </dd>
-
-  </dl></div>
-
-
   <h3 id=atob><span class=secno>7.2 </span>Base64 utility methods</h3>
 
   <p>The <code title=dom-windowbase64-atob><a href=#dom-windowbase64-atob>atob()</a></code> and <code title=dom-windowbase64-btoa><a href=#dom-windowbase64-btoa>btoa()</a></code> methods allow authors to

Modified: source
===================================================================
--- source	2011-02-03 21:15:19 UTC (rev 5826)
+++ source	2011-02-03 21:28:14 UTC (rev 5827)
@@ -73037,6 +73037,68 @@
 
   <div class="impl">
 
+  <h5 id="runtime-script-errors">Runtime script errors</h5>
+
+  <p>Whenever an uncaught runtime script error occurs in one of the
+  scripts associated with a <code>Document</code>, the user agent must
+  <span>report the error</span> using the <code
+  title="handler-window-onerror">onerror</code> <span title="event
+  handlers">event handler</span> of the <span>script's global
+  object</span>. If the error is still <i
+  title="concept-error-nothandled">not handled</i> after this, then
+  the error may be reported to the user.</p>
+
+  <hr>
+
+  <p>When the user agent is required to <dfn title="report the
+  error">report an error</dfn> <var title="">error</var> using the
+  <span title="event handlers">event handler</span> <var
+  title="">onerror</var>, it must run these steps, after which the
+  error is either <dfn
+  title="concept-error-handled"><i>handled</i></dfn> or <dfn
+  title="concept-error-nothandled"><i>not handled</i></dfn>:</p>
+
+  <dl class="switch">
+
+   <dt>If the value of <var title="">onerror</var> is a
+   <code>Function</code></dt>
+
+   <dd>
+
+    <p>The function must be invoked with three arguments. The three
+    arguments passed to the function are all <code>DOMString</code>s;
+    the first must give the message that the UA is considering
+    reporting, the second must give the <span>absolute URL</span> of
+    the resource in which the error occurred, and the third must give
+    the line number in that resource on which the error occurred.</p>
+
+    <p>If the function returns false, then the error is <i
+    title="concept-error-handled">handled</i>. Otherwise, the error is
+    <i title="concept-error-nothandled">not handled</i>.</p>
+
+    <p>Any uncaught exceptions thrown or errors caused by this
+    function may be reported to the user immediately after the error
+    that the function was called for; the <span title="report the
+    error">report an error</span> algorithm must not be used to handle
+    exceptions thrown or errors caused by this function.</p>
+
+   </dd>
+
+   <dt>Otherwise</dt>
+
+   <dd>
+
+    <p>The error is <i title="concept-error-nothandled">not handled</i>.</p>
+
+   </dd>
+
+  </dl>
+
+  </div>
+
+
+  <div class="impl">
+
   <h4>Event loops</h4>
 
   <h5>Definitions</h5>
@@ -74043,71 +74105,7 @@
   </div>
 
 
-  <div class="impl">
 
-  <h5 id="runtime-script-errors">Runtime script errors</h5>
-
-  <p><i>This section only applies to user agents that support
-  scripting in general and JavaScript in particular.</i></p>
-
-  <p>Whenever an uncaught runtime script error occurs in one of the
-  scripts associated with a <code>Document</code>, the user agent must
-  <span>report the error</span> using the <code
-  title="handler-window-onerror">onerror</code> <span title="event
-  handlers">event handler</span> of the <span>script's global
-  object</span>. If the error is still <i
-  title="concept-error-nothandled">not handled</i> after this, then
-  the error may be reported to the user.</p>
-
-  <hr>
-
-  <p>When the user agent is required to <dfn title="report the
-  error">report an error</dfn> <var title="">error</var> using the
-  <span title="event handlers">event handler</span> <var
-  title="">onerror</var>, it must run these steps, after which the
-  error is either <dfn
-  title="concept-error-handled"><i>handled</i></dfn> or <dfn
-  title="concept-error-nothandled"><i>not handled</i></dfn>:</p>
-
-  <dl class="switch">
-
-   <dt>If the value of <var title="">onerror</var> is a
-   <code>Function</code></dt>
-
-   <dd>
-
-    <p>The function must be invoked with three arguments. The three
-    arguments passed to the function are all <code>DOMString</code>s;
-    the first must give the message that the UA is considering
-    reporting, the second must give the <span>absolute URL</span> of
-    the resource in which the error occurred, and the third must give
-    the line number in that resource on which the error occurred.</p>
-
-    <p>If the function returns false, then the error is <i
-    title="concept-error-handled">handled</i>. Otherwise, the error is
-    <i title="concept-error-nothandled">not handled</i>.</p>
-
-    <p>Any uncaught exceptions thrown or errors caused by this
-    function may be reported to the user immediately after the error
-    that the function was called for; the <span title="report the
-    error">report an error</span> algorithm must not be used to handle
-    exceptions thrown or errors caused by this function.</p>
-
-   </dd>
-
-   <dt>Otherwise</dt>
-
-   <dd>
-
-    <p>The error is <i title="concept-error-nothandled">not handled</i>.</p>
-
-   </dd>
-
-  </dl>
-
-  </div>
-
-
   <h3 id="atob">Base64 utility methods</h3>
 
   <p>The <code title="dom-windowbase64-atob">atob()</code> and <code




More information about the Commit-Watchers mailing list