[html5] r2550 - [e] (0) Redefine onerror='' handling to be reusable from other specs.

whatwg at whatwg.org whatwg at whatwg.org
Tue Dec 23 12:33:32 PST 2008


Author: ianh
Date: 2008-12-23 12:33:31 -0800 (Tue, 23 Dec 2008)
New Revision: 2550

Modified:
   index
   source
Log:
[e] (0) Redefine onerror='' handling to be reusable from other specs.

Modified: index
===================================================================
--- index	2008-12-23 03:41:52 UTC (rev 2549)
+++ index	2008-12-23 20:33:31 UTC (rev 2550)
@@ -34619,16 +34619,27 @@
   scripting in general and ECMAScript in particular.</em></p>
 
   <p>Whenever a runtime script error occurs in one of the scripts
-  associated with the document, the value of the <code title=handler-onerror><a href=#handler-onerror>onerror</a></code> <span>event handler DOM
-  attribute</span> of the <code><a href=#window>Window</a></code> object must be
-  processed, as follows:</p>
+  associated with the document, the user agent must <a href=#report-the-error>report the
+  error</a> using the <code title=handler-onerror><a href=#handler-onerror>onerror</a></code>
+  <a href=#event-handler-dom-attributes title="event handler DOM attributes">event handler DOM
+  attribute</a> of the <code><a href=#window>Window</a></code>. If the error is still
+  <i title="">not handled</i> after this, then the error should be
+  reported to the user.</p>
 
-  <dl class=switch><dt>If the value is a function</dt>
+  <p>The initial value of <code title=handler-onerror><a href=#handler-onerror>onerror</a></code>
+  must be <code>undefined</code>.</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
+  attribute <var title="">onerror</var>, it must run these steps,
+  after which the error is either <i title="">handled</i> or <i title="">not handled</i>:</p>
+
+  <dl class=switch><dt>If the value of <var title="">onerror</var> is a function</dt>
+
    <dd>
 
-    <p>The function referenced by the <code title=handler-onerror><a href=#handler-onerror>onerror</a></code> attribute must be invoked
-    with three arguments, before notifying the user of the error.</p>
+    <p>The function referenced by the <var title="">onerror</var>
+    attribute must be invoked with three arguments.</p>
 
     <p>The three arguments passed to the function are all
     <code>DOMString</code>s; the first must give the message that the
@@ -34637,14 +34648,13 @@
     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 should not be
-    reported to the user. Otherwise, if the function returns another
-    value (or does not return at all), the error should be reported to
-    the user.</p>
+    <p>If the function returns false, then the error is <i title="">handled</i>. Otherwise, the error is <i title="">not
+    handled</i>.</p>
 
     <p>Any exceptions thrown or errors caused by this function must be
     reported to the user immediately after the error that the function
-    was called for, without calling the function again.</p>
+    was called for, without using the <a href=#report-the-error title="report the
+    error">report an error</a> algorithm again.</p>
 
    </dd>
 
@@ -34652,7 +34662,7 @@
 
    <dd>
 
-    <p>The error should not reported to the user.</p>
+    <p>The error is <i title="">handled</i>.</p>
 
    </dd>
 
@@ -34660,17 +34670,12 @@
 
    <dd>
 
-    <p>The error should be reported to the user.</p>
+    <p>The error is <i title="">not handled</i>.</p>
 
    </dd>
 
-  </dl><p>The initial value of <code title=handler-onerror><a href=#handler-onerror>onerror</a></code>
-  must be <code>undefined</code>.</p>
+  </dl><h3 id=user-prompts><span class=secno>5.5 </span>User prompts</h3>
 
-
-
-  <h3 id=user-prompts><span class=secno>5.5 </span>User prompts</h3>
-
   <h4 id=simple-dialogs><span class=secno>5.5.1 </span>Simple dialogs</h4>
 
   <p>The <dfn id=dom-alert title=dom-alert><code>alert(<var title="">message</var>)</code></dfn> method, when invoked, must show

Modified: source
===================================================================
--- source	2008-12-23 03:41:52 UTC (rev 2549)
+++ source	2008-12-23 20:33:31 UTC (rev 2550)
@@ -39395,20 +39395,32 @@
   scripting in general and ECMAScript in particular.</em></p>
 
   <p>Whenever a runtime script error occurs in one of the scripts
-  associated with the document, the value of the <code
-  title="handler-onerror">onerror</code> <span>event handler DOM
-  attribute</span> of the <code>Window</code> object must be
-  processed, as follows:</p>
+  associated with the document, the user agent must <span>report the
+  error</span> using the <code title="handler-onerror">onerror</code>
+  <span title="event handler DOM attributes">event handler DOM
+  attribute</span> of the <code>Window</code>. If the error is still
+  <i title="">not handled</i> after this, then the error should be
+  reported to the user.</p>
 
+  <p>The initial value of <code title="handler-onerror">onerror</code>
+  must be <code>undefined</code>.</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
+  attribute <var title="">onerror</var>, it must run these steps,
+  after which the error is either <i title="">handled</i> or <i
+  title="">not handled</i>:</p>
+
   <dl class="switch">
 
-   <dt>If the value is a function</dt>
+   <dt>If the value of <var title="">onerror</var> is a function</dt>
 
    <dd>
 
-    <p>The function referenced by the <code
-    title="handler-onerror">onerror</code> attribute must be invoked
-    with three arguments, before notifying the user of the error.</p>
+    <p>The function referenced by the <var title="">onerror</var>
+    attribute must be invoked with three arguments.</p>
 
     <p>The three arguments passed to the function are all
     <code>DOMString</code>s; the first must give the message that the
@@ -39417,14 +39429,14 @@
     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 should not be
-    reported to the user. Otherwise, if the function returns another
-    value (or does not return at all), the error should be reported to
-    the user.</p>
+    <p>If the function returns false, then the error is <i
+    title="">handled</i>. Otherwise, the error is <i title="">not
+    handled</i>.</p>
 
     <p>Any exceptions thrown or errors caused by this function must be
     reported to the user immediately after the error that the function
-    was called for, without calling the function again.</p>
+    was called for, without using the <span title="report the
+    error">report an error</span> algorithm again.</p>
 
    </dd>
 
@@ -39432,7 +39444,7 @@
 
    <dd>
 
-    <p>The error should not reported to the user.</p>
+    <p>The error is <i title="">handled</i>.</p>
 
    </dd>
 
@@ -39440,17 +39452,14 @@
 
    <dd>
 
-    <p>The error should be reported to the user.</p>
+    <p>The error is <i title="">not handled</i>.</p>
 
    </dd>
 
   </dl>
 
-  <p>The initial value of <code title="handler-onerror">onerror</code>
-  must be <code>undefined</code>.</p>
 
 
-
   <h3>User prompts</h3>
 
   <h4>Simple dialogs</h4>




More information about the Commit-Watchers mailing list