Navigation Menu

Skip to content

Commit

Permalink
[e] (0) move the 'onerror' stuff up to script execution and away from…
Browse files Browse the repository at this point in the history
… the no-more-related events stuff

Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=11320

git-svn-id: http://svn.whatwg.org/webapps@5827 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Feb 3, 2011
1 parent 97d22dd commit a012c05
Show file tree
Hide file tree
Showing 3 changed files with 168 additions and 174 deletions.
108 changes: 53 additions & 55 deletions complete.html
Expand Up @@ -939,7 +939,8 @@ <h2 class="no-num no-toc" id=contents>Table of contents</h2>
<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>
Expand All @@ -951,8 +952,7 @@ <h2 class="no-num no-toc" id=contents>Table of contents</h2>
<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>
Expand Down Expand Up @@ -64200,6 +64200,56 @@ <h5 id=killing-scripts><span class=secno>7.1.3.4 </span>Killing scripts</h5>
</div>


<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>
Expand Down Expand Up @@ -65049,58 +65099,6 @@ <h5 id=events-and-the-window-object><span class=secno>7.1.6.4 </span>Events and
</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>

Expand Down
108 changes: 53 additions & 55 deletions index
Expand Up @@ -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>
Expand All @@ -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>
Expand Down Expand Up @@ -64197,6 +64197,56 @@ NETWORK:
</div>


<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>
Expand Down Expand Up @@ -65051,58 +65101,6 @@ interface <dfn id=function>Function</dfn> {
</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>

Expand Down

0 comments on commit a012c05

Please sign in to comment.