Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[e] (0) Try to clarify event handler stuff
Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=20549
Affected topics: HTML

git-svn-id: http://svn.whatwg.org/webapps@7637 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Jan 5, 2013
1 parent 3bcbdf7 commit e5a0f4d
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 17 deletions.
24 changes: 18 additions & 6 deletions complete.html
Expand Up @@ -248,7 +248,7 @@

<header class=head id=head><p><a class=logo href=http://www.whatwg.org/><img alt=WHATWG height=101 src=/images/logo width=101></a></p>
<hgroup><h1 class=allcaps>HTML</h1>
<h2 class="no-num no-toc">Living Standard &mdash; Last Updated 4 January 2013</h2>
<h2 class="no-num no-toc">Living Standard &mdash; Last Updated 5 January 2013</h2>
</hgroup><dl><dt><strong>Web developer edition:</strong></dt>
<dd><strong><a href=http://developers.whatwg.org/>http://developers.whatwg.org/</a></strong></dd>
<dt>Multiple-page version:</dt>
Expand Down Expand Up @@ -73967,6 +73967,9 @@ <h5 id=event-handler-attributes><span class=secno>7.1.6.1 </span>Event handlers<
<p>Many objects can have <dfn id=event-handlers>event handlers</dfn> specified. These act as non-capture event
listeners for the object on which they are specified. <a href=#refsDOM>[DOM]</a></p>

<p>An <a href=#event-handlers title="event handlers">event handler</a> has a name, which always starts with
"<code title="">on</code>" and is followed by the name of the event for which it is intended.</p>

<p>An <a href=#event-handlers title="event handlers">event handler</a> can either have the value null or be set
to a callback object. This is defined using the <code><a href=#eventhandler>EventHandler</a></code> callback interface type.
<span class=impl>Initially, event handlers must be set to null.</span></p>
Expand All @@ -73982,7 +73985,11 @@ <h5 id=event-handler-attributes><span class=secno>7.1.6.1 </span>Event handlers<

<div class=impl>

<hr><p><dfn id=event-handler-idl-attributes>Event handler IDL attributes</dfn>, on setting, must set the corresponding event handler
<hr><p>An <dfn id=event-handler-idl-attributes title="event handler IDL attributes">event handler IDL attribute</dfn> is an IDL
attribute for a specific <a href=#event-handlers title="event handlers">event handler</a>. The name of the IDL
attribute is the same as the name of the <a href=#event-handlers title="event handlers">event handler</a>.</p>

<p><a href=#event-handler-idl-attributes>Event handler IDL attributes</a>, on setting, must set the corresponding event handler
to their new value, and on getting, must return whatever the current value of the corresponding
event handler is (possibly null).</p>

Expand All @@ -73999,15 +74006,20 @@ <h5 id=event-handler-attributes><span class=secno>7.1.6.1 </span>Event handlers<
<code><a href=#messageport>MessagePort</a></code> objects.</p>

<p>On getting, <a href=#event-handler-idl-attributes>event handler IDL attributes</a> must return the value of their
corresponding event handlers, except when the value is an <a href=#concept-handler-error title=concept-handler-error>internal error value</a>, in which case the user agent must set
corresponding <a href=#event-handlers>event handlers</a>, except when the value is an <a href=#concept-handler-error title=concept-handler-error>internal error value</a>, in which case the user agent must set
the corresponding event handler to null, and then throw an exception corresponding to the error
condition.</p>

<hr></div>

<p><dfn id=event-handler-content-attributes>Event handler content attributes</dfn>, when specified, must contain valid JavaScript code
which, when parsed, would match the <code title="">FunctionBody</code> production after automatic
semicolon insertion. <a href=#refsECMA262>[ECMA262]</a></p>
<p>An <dfn id=event-handler-content-attributes title="event handler content attributes">event handler content attribute</dfn> is a
content attribute for a specific <a href=#event-handlers title="event handlers">event handler</a>. The name of
the content attribute is the same as the name of the <a href=#event-handlers title="event handlers">event
handler</a>.</p>

<p><a href=#event-handler-content-attributes>Event handler content attributes</a>, when specified, must contain valid JavaScript
code which, when parsed, would match the <code title="">FunctionBody</code> production after
automatic semicolon insertion. <a href=#refsECMA262>[ECMA262]</a></p>

<div class=impl>

Expand Down
24 changes: 18 additions & 6 deletions index
Expand Up @@ -248,7 +248,7 @@

<header class=head id=head><p><a class=logo href=http://www.whatwg.org/><img alt=WHATWG height=101 src=/images/logo width=101></a></p>
<hgroup><h1 class=allcaps>HTML</h1>
<h2 class="no-num no-toc">Living Standard &mdash; Last Updated 4 January 2013</h2>
<h2 class="no-num no-toc">Living Standard &mdash; Last Updated 5 January 2013</h2>
</hgroup><dl><dt><strong>Web developer edition:</strong></dt>
<dd><strong><a href=http://developers.whatwg.org/>http://developers.whatwg.org/</a></strong></dd>
<dt>Multiple-page version:</dt>
Expand Down Expand Up @@ -73967,6 +73967,9 @@ interface <dfn id=navigatoronline>NavigatorOnLine</dfn> {
<p>Many objects can have <dfn id=event-handlers>event handlers</dfn> specified. These act as non-capture event
listeners for the object on which they are specified. <a href=#refsDOM>[DOM]</a></p>

<p>An <a href=#event-handlers title="event handlers">event handler</a> has a name, which always starts with
"<code title="">on</code>" and is followed by the name of the event for which it is intended.</p>

<p>An <a href=#event-handlers title="event handlers">event handler</a> can either have the value null or be set
to a callback object. This is defined using the <code><a href=#eventhandler>EventHandler</a></code> callback interface type.
<span class=impl>Initially, event handlers must be set to null.</span></p>
Expand All @@ -73982,7 +73985,11 @@ interface <dfn id=navigatoronline>NavigatorOnLine</dfn> {

<div class=impl>

<hr><p><dfn id=event-handler-idl-attributes>Event handler IDL attributes</dfn>, on setting, must set the corresponding event handler
<hr><p>An <dfn id=event-handler-idl-attributes title="event handler IDL attributes">event handler IDL attribute</dfn> is an IDL
attribute for a specific <a href=#event-handlers title="event handlers">event handler</a>. The name of the IDL
attribute is the same as the name of the <a href=#event-handlers title="event handlers">event handler</a>.</p>

<p><a href=#event-handler-idl-attributes>Event handler IDL attributes</a>, on setting, must set the corresponding event handler
to their new value, and on getting, must return whatever the current value of the corresponding
event handler is (possibly null).</p>

Expand All @@ -73999,15 +74006,20 @@ interface <dfn id=navigatoronline>NavigatorOnLine</dfn> {
<code><a href=#messageport>MessagePort</a></code> objects.</p>

<p>On getting, <a href=#event-handler-idl-attributes>event handler IDL attributes</a> must return the value of their
corresponding event handlers, except when the value is an <a href=#concept-handler-error title=concept-handler-error>internal error value</a>, in which case the user agent must set
corresponding <a href=#event-handlers>event handlers</a>, except when the value is an <a href=#concept-handler-error title=concept-handler-error>internal error value</a>, in which case the user agent must set
the corresponding event handler to null, and then throw an exception corresponding to the error
condition.</p>

<hr></div>

<p><dfn id=event-handler-content-attributes>Event handler content attributes</dfn>, when specified, must contain valid JavaScript code
which, when parsed, would match the <code title="">FunctionBody</code> production after automatic
semicolon insertion. <a href=#refsECMA262>[ECMA262]</a></p>
<p>An <dfn id=event-handler-content-attributes title="event handler content attributes">event handler content attribute</dfn> is a
content attribute for a specific <a href=#event-handlers title="event handlers">event handler</a>. The name of
the content attribute is the same as the name of the <a href=#event-handlers title="event handlers">event
handler</a>.</p>

<p><a href=#event-handler-content-attributes>Event handler content attributes</a>, when specified, must contain valid JavaScript
code which, when parsed, would match the <code title="">FunctionBody</code> production after
automatic semicolon insertion. <a href=#refsECMA262>[ECMA262]</a></p>

<div class=impl>

Expand Down
22 changes: 17 additions & 5 deletions source
Expand Up @@ -86485,6 +86485,9 @@ interface <dfn>NavigatorOnLine</dfn> {
<p>Many objects can have <dfn>event handlers</dfn> specified. These act as non-capture event
listeners for the object on which they are specified. <a href="#refsDOM">[DOM]</a></p>

<p>An <span title="event handlers">event handler</span> has a name, which always starts with
"<code title="">on</code>" and is followed by the name of the event for which it is intended.</p>

<p>An <span title="event handlers">event handler</span> can either have the value null or be set
to a callback object. This is defined using the <code>EventHandler</code> callback interface type.
<span class="impl">Initially, event handlers must be set to null.</span></p>
Expand All @@ -86502,7 +86505,11 @@ interface <dfn>NavigatorOnLine</dfn> {

<hr>

<p><dfn>Event handler IDL attributes</dfn>, on setting, must set the corresponding event handler
<p>An <dfn title="event handler IDL attributes">event handler IDL attribute</dfn> is an IDL
attribute for a specific <span title="event handlers">event handler</span>. The name of the IDL
attribute is the same as the name of the <span title="event handlers">event handler</span>.</p>

<p><span>Event handler IDL attributes</span>, on setting, must set the corresponding event handler
to their new value, and on getting, must return whatever the current value of the corresponding
event handler is (possibly null).</p>

Expand All @@ -86519,7 +86526,7 @@ interface <dfn>NavigatorOnLine</dfn> {
<code>MessagePort</code> objects.</p>

<p>On getting, <span>event handler IDL attributes</span> must return the value of their
corresponding event handlers, except when the value is an <span
corresponding <span>event handlers</span>, except when the value is an <span
title="concept-handler-error">internal error value</span>, in which case the user agent must set
the corresponding event handler to null, and then throw an exception corresponding to the error
condition.</p>
Expand All @@ -86528,9 +86535,14 @@ interface <dfn>NavigatorOnLine</dfn> {

</div>

<p><dfn>Event handler content attributes</dfn>, when specified, must contain valid JavaScript code
which, when parsed, would match the <code title="">FunctionBody</code> production after automatic
semicolon insertion. <a href="#refsECMA262">[ECMA262]</a></p>
<p>An <dfn title="event handler content attributes">event handler content attribute</dfn> is a
content attribute for a specific <span title="event handlers">event handler</span>. The name of
the content attribute is the same as the name of the <span title="event handlers">event
handler</span>.</p>

<p><span>Event handler content attributes</span>, when specified, must contain valid JavaScript
code which, when parsed, would match the <code title="">FunctionBody</code> production after
automatic semicolon insertion. <a href="#refsECMA262">[ECMA262]</a></p>

<div class="impl">

Expand Down

0 comments on commit e5a0f4d

Please sign in to comment.