Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[] (0) Simplify window.onerror.
git-svn-id: http://svn.whatwg.org/webapps@2807 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Feb 13, 2009
1 parent e75461f commit 1e2ca39
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 47 deletions.
27 changes: 5 additions & 22 deletions index
Expand Up @@ -11680,7 +11680,7 @@ not-slash = %x0000-002E / %x0030-%10FFFF
<dd>
<pre class=idl>interface <dfn id=htmlbodyelement>HTMLBodyElement</dfn> : <a href=#htmlelement>HTMLElement</a> {
attribute <a href=#function>Function</a> <a href=#handler-window-onbeforeunload title=handler-window-onbeforeunload>onbeforeunload</a>;
attribute any <!-- --> <a href=#handler-window-onerror title=handler-window-onerror>onerror</a>;
attribute <a href=#function>Function</a> <a href=#handler-window-onerror title=handler-window-onerror>onerror</a>;
attribute <a href=#function>Function</a> <a href=#handler-window-onhashchange title=handler-window-onhashchange>onhashchange</a>;
attribute <a href=#function>Function</a> <a href=#handler-window-onload title=handler-window-onload>onload</a>;
attribute <a href=#function>Function</a> <a href=#handler-window-onmessage title=handler-window-onmessage>onmessage</a>;
Expand Down Expand Up @@ -36667,7 +36667,7 @@ interface <dfn id=window>Window</dfn> {
attribute <a href=#function>Function</a> <a href=#handler-ondragover title=handler-ondragover>ondragover</a>;
attribute <a href=#function>Function</a> <a href=#handler-ondragstart title=handler-ondragstart>ondragstart</a>;
attribute <a href=#function>Function</a> <a href=#handler-ondrop title=handler-ondrop>ondrop</a>;
attribute any <!-- --> <a href=#handler-window-onerror title=handler-window-onerror>onerror</a>;
attribute <a href=#function>Function</a> <a href=#handler-window-onerror title=handler-window-onerror>onerror</a>;
attribute <a href=#function>Function</a> <a href=#handler-onfocus title=handler-onfocus>onfocus</a>;
attribute <a href=#function>Function</a> <a href=#handler-window-onhashchange title=handler-window-onhashchange>onhashchange</a>;
attribute <a href=#function>Function</a> <a href=#handler-onkeydown title=handler-onkeydown>onkeydown</a>;
Expand Down Expand Up @@ -38176,10 +38176,6 @@ JSURL: http://ietfreport.isoc.org/all-ids/draft-hoehrmann-javascript-scheme-00.t
unless otherwise specified, an event handler attribute must be set
to null.</p>

<p class=note>Some event handler attributes allow other values and
have other initial values, in particular the <code title=handler-window-onerror><a href=#handler-window-onerror>onerror</a></code> event handler
attribute on the <code><a href=#window>Window</a></code> object.</p>

<p>Event handler attributes are exposed in one or two ways.</p>

<p>The first way, common to all event handler attributes, is as an
Expand Down Expand Up @@ -38281,9 +38277,8 @@ JSURL: http://ietfreport.isoc.org/all-ids/draft-hoehrmann-javascript-scheme-00.t
<hr>

<p>All event handler attributes on an element, whether set to null
or to a <code><a href=#function>Function</a></code> object<!-- or to anything else, in the
case of 'onerror' -->, must be registered as event listeners on the
element, as if the <code title=dom-EventTarget-addEventListenerNS>addEventListenerNS()</code>
or to a <code><a href=#function>Function</a></code> object, must be registered as event
listeners on the element, as if the <code title=dom-EventTarget-addEventListenerNS>addEventListenerNS()</code>
method on the <code>Element</code> object's <code>EventTarget</code>
interface had been invoked when the event handler attribute's
element or object was created, with the event type (<var title=dom-event-type>type</var> argument) equal to the type
Expand Down Expand Up @@ -38573,10 +38568,6 @@ interface <dfn id=function>Function</dfn> {
<p>Must be invoked whenever an <code title=event-error><a href=#event-error>error</a></code> event is targeted at or bubbles
through the object.</p>

<p>Unlike other event handler attributes, the <code title=handler-window-onerror><a href=#handler-window-onerror>onerror</a></code> event handler attribute can
have any value. The initial value of <code title=handler-window-onerror><a href=#handler-window-onerror>onerror</a></code> must be
<code>undefined</code>.</p>

<p class=note>The <code title=handler-window-onerror><a href=#handler-window-onerror>onerror</a></code>
handler is also used for <a href=#runtime-script-errors>reporting script errors</a>.</p>

Expand Down Expand Up @@ -38766,15 +38757,7 @@ interface <dfn id=function>Function</dfn> {

</dd>

<dt>If the value is <code>null</code></dt>

<dd>

<p>The error is <i title="">handled</i>.</p>

</dd>

<dt>If the value is anything else</dt>
<dt>Otherwise</dt>

<dd>

Expand Down
30 changes: 5 additions & 25 deletions source
Expand Up @@ -11367,7 +11367,7 @@ not-slash = %x0000-002E / %x0030-%10FFFF
<dd>
<pre class="idl">interface <dfn>HTMLBodyElement</dfn> : <span>HTMLElement</span> {
attribute <span>Function</span> <span title="handler-window-onbeforeunload">onbeforeunload</span>;
attribute any <!-- --> <span title="handler-window-onerror">onerror</span>;
attribute <span>Function</span> <span title="handler-window-onerror">onerror</span>;
attribute <span>Function</span> <span title="handler-window-onhashchange">onhashchange</span>;
attribute <span>Function</span> <span title="handler-window-onload">onload</span>;
attribute <span>Function</span> <span title="handler-window-onmessage">onmessage</span>;
Expand Down Expand Up @@ -39131,7 +39131,7 @@ interface <dfn>Window</dfn> {
attribute <span>Function</span> <span title="handler-ondragover">ondragover</span>;
attribute <span>Function</span> <span title="handler-ondragstart">ondragstart</span>;
attribute <span>Function</span> <span title="handler-ondrop">ondrop</span>;
attribute any <!-- --> <span title="handler-window-onerror">onerror</span>;
attribute <span>Function</span> <span title="handler-window-onerror">onerror</span>;
attribute <span>Function</span> <span title="handler-onfocus">onfocus</span>;
attribute <span>Function</span> <span title="handler-window-onhashchange">onhashchange</span>;
attribute <span>Function</span> <span title="handler-onkeydown">onkeydown</span>;
Expand Down Expand Up @@ -40740,11 +40740,6 @@ JSURL: http://ietfreport.isoc.org/all-ids/draft-hoehrmann-javascript-scheme-00.t
unless otherwise specified, an event handler attribute must be set
to null.</p>

<p class="note">Some event handler attributes allow other values and
have other initial values, in particular the <code
title="handler-window-onerror">onerror</code> event handler
attribute on the <code>Window</code> object.</p>

<p>Event handler attributes are exposed in one or two ways.</p>

<p>The first way, common to all event handler attributes, is as an
Expand Down Expand Up @@ -40854,9 +40849,8 @@ JSURL: http://ietfreport.isoc.org/all-ids/draft-hoehrmann-javascript-scheme-00.t
<hr>

<p>All event handler attributes on an element, whether set to null
or to a <code>Function</code> object<!-- or to anything else, in the
case of 'onerror' -->, must be registered as event listeners on the
element, as if the <code
or to a <code>Function</code> object, must be registered as event
listeners on the element, as if the <code
title="dom-EventTarget-addEventListenerNS">addEventListenerNS()</code>
method on the <code>Element</code> object's <code>EventTarget</code>
interface had been invoked when the event handler attribute's
Expand Down Expand Up @@ -41182,12 +41176,6 @@ interface <dfn>Function</dfn> {
title="event-error">error</code> event is targeted at or bubbles
through the object.</p>

<p>Unlike other event handler attributes, the <code
title="handler-window-onerror">onerror</code> event handler attribute can
have any value. The initial value of <code
title="handler-window-onerror">onerror</code> must be
<code>undefined</code>.</p>

<p class="note">The <code title="handler-window-onerror">onerror</code>
handler is also used for <a
href="#runtime-script-errors">reporting script errors</a>.</p>
Expand Down Expand Up @@ -41410,15 +41398,7 @@ interface <dfn>Function</dfn> {

</dd>

<dt>If the value is <code>null</code></dt>

<dd>

<p>The error is <i title="">handled</i>.</p>

</dd>

<dt>If the value is anything else</dt>
<dt>Otherwise</dt>

<dd>

Expand Down

0 comments on commit 1e2ca39

Please sign in to comment.