- From: poot <cvsmail@w3.org>
- Date: Wed, 21 Jan 2009 20:11:34 +0900 (JST)
- To: public-html-diffs@w3.org
Define how the Window-magic event handler attributes like window.onload work. Tighten up the text around event handler attributes. (whatwg r2685) 5.3 Origin http://people.w3.org/mike/diffs/html5/spec/Overview.1.1855.html#origin onselect http://people.w3.org/mike/diffs/html5/spec/Overview.1.1855.html#handler-onselect onload http://people.w3.org/mike/diffs/html5/spec/Overview.1.1855.html#handler-onload onabort http://people.w3.org/mike/diffs/html5/spec/Overview.1.1855.html#handler-onabort 3.3.3 Global attributes http://people.w3.org/mike/diffs/html5/spec/Overview.1.1855.html#global-attributes onunload http://people.w3.org/mike/diffs/html5/spec/Overview.1.1855.html#handler-window-onunload 4.4.2 The section element http://people.w3.org/mike/diffs/html5/spec/Overview.1.1855.html#the-section-element onoffline http://people.w3.org/mike/diffs/html5/spec/Overview.1.1855.html#handler-window-onoffline 5.4.5 The javascript: protocol http://people.w3.org/mike/diffs/html5/spec/Overview.1.1855.html#javascript-protocol onmousemove http://people.w3.org/mike/diffs/html5/spec/Overview.1.1855.html#handler-onmousemove 5.4.6.2 Event handler attributes on elements and on Window objects http://people.w3.org/mike/diffs/html5/spec/Overview.1.1855.html#event-handler-attributes-on-elements-and-on-window-objects ondragover http://people.w3.org/mike/diffs/html5/spec/Overview.1.1855.html#handler-ondragover onkeypress http://people.w3.org/mike/diffs/html5/spec/Overview.1.1855.html#handler-onkeypress onsubmit http://people.w3.org/mike/diffs/html5/spec/Overview.1.1855.html#handler-onsubmit onblur http://people.w3.org/mike/diffs/html5/spec/Overview.1.1855.html#handler-onblur onscroll http://people.w3.org/mike/diffs/html5/spec/Overview.1.1855.html#handler-onscroll ondragstart http://people.w3.org/mike/diffs/html5/spec/Overview.1.1855.html#handler-ondragstart session history http://people.w3.org/mike/diffs/html5/spec/Overview.1.1855.html#session-history HTMLBodyElement http://people.w3.org/mike/diffs/html5/spec/Overview.1.1855.html#htmlbodyelement onmousedown http://people.w3.org/mike/diffs/html5/spec/Overview.1.1855.html#handler-onmousedown ondrag http://people.w3.org/mike/diffs/html5/spec/Overview.1.1855.html#handler-ondrag onmouseout http://people.w3.org/mike/diffs/html5/spec/Overview.1.1855.html#handler-onmouseout onbeforeunload http://people.w3.org/mike/diffs/html5/spec/Overview.1.1855.html#handler-window-onbeforeunload onfocus http://people.w3.org/mike/diffs/html5/spec/Overview.1.1855.html#handler-onfocus onmousewheel http://people.w3.org/mike/diffs/html5/spec/Overview.1.1855.html#handler-onmousewheel 5.4.6.3 Event firing http://people.w3.org/mike/diffs/html5/spec/Overview.1.1855.html#event-firing Window http://people.w3.org/mike/diffs/html5/spec/Overview.1.1855.html#window onclick http://people.w3.org/mike/diffs/html5/spec/Overview.1.1855.html#handler-onclick HTMLElement http://people.w3.org/mike/diffs/html5/spec/Overview.1.1855.html#htmlelement onerror http://people.w3.org/mike/diffs/html5/spec/Overview.1.1855.html#handler-onerror Event handler DOM attributes http://people.w3.org/mike/diffs/html5/spec/Overview.1.1855.html#event-handler-dom-attributes ondrop http://people.w3.org/mike/diffs/html5/spec/Overview.1.1855.html#handler-ondrop 5.4.6 Events http://people.w3.org/mike/diffs/html5/spec/Overview.1.1855.html#events onmessage http://people.w3.org/mike/diffs/html5/spec/Overview.1.1855.html#handler-onmessage onmessage http://people.w3.org/mike/diffs/html5/spec/Overview.1.1855.html#handler-messageport-onmessage onstorage http://people.w3.org/mike/diffs/html5/spec/Overview.1.1855.html#handler-window-onstorage close() http://people.w3.org/mike/diffs/html5/spec/Overview.1.1855.html#dom-messageport-close 5.4.6.5 Runtime script errors http://people.w3.org/mike/diffs/html5/spec/Overview.1.1855.html#runtime-script-errors onresize http://people.w3.org/mike/diffs/html5/spec/Overview.1.1855.html#handler-window-onresize offline http://people.w3.org/mike/diffs/html5/spec/Overview.1.1855.html#event-offline ondragenter http://people.w3.org/mike/diffs/html5/spec/Overview.1.1855.html#handler-ondragenter ononline http://people.w3.org/mike/diffs/html5/spec/Overview.1.1855.html#handler-window-ononline online http://people.w3.org/mike/diffs/html5/spec/Overview.1.1855.html#event-online onkeydown http://people.w3.org/mike/diffs/html5/spec/Overview.1.1855.html#handler-onkeydown onchecking http://people.w3.org/mike/diffs/html5/spec/Overview.1.1855.html#handler-appcache-onchecking report an error http://people.w3.org/mike/diffs/html5/spec/Overview.1.1855.html#report-the-error ondragend http://people.w3.org/mike/diffs/html5/spec/Overview.1.1855.html#handler-ondragend Event handler content attributes http://people.w3.org/mike/diffs/html5/spec/Overview.1.1855.html#event-handler-content-attributes onopen http://people.w3.org/mike/diffs/html5/spec/Overview.1.1855.html#handler-websocket-onopen 4.4.1 The body element http://people.w3.org/mike/diffs/html5/spec/Overview.1.1855.html#the-body-element ondblclick http://people.w3.org/mike/diffs/html5/spec/Overview.1.1855.html#handler-ondblclick 5.4.6.4 Events and the Window object http://people.w3.org/mike/diffs/html5/spec/Overview.1.1855.html#events-and-the-window-object onmouseup http://people.w3.org/mike/diffs/html5/spec/Overview.1.1855.html#handler-onmouseup onerror http://people.w3.org/mike/diffs/html5/spec/Overview.1.1855.html#handler-window-onerror ondragleave http://people.w3.org/mike/diffs/html5/spec/Overview.1.1855.html#handler-ondragleave oncontextmenu http://people.w3.org/mike/diffs/html5/spec/Overview.1.1855.html#handler-oncontextmenu close http://people.w3.org/mike/diffs/html5/spec/Overview.1.1855.html#event-websocket-close swapCache() http://people.w3.org/mike/diffs/html5/spec/Overview.1.1855.html#dom-appcache-swapcache onhashchange http://people.w3.org/mike/diffs/html5/spec/Overview.1.1855.html#handler-window-onhashchange onmouseover http://people.w3.org/mike/diffs/html5/spec/Overview.1.1855.html#handler-onmouseover onload http://people.w3.org/mike/diffs/html5/spec/Overview.1.1855.html#handler-window-onload 5.8 Session history and navigation http://people.w3.org/mike/diffs/html5/spec/Overview.1.1855.html#history onmessage http://people.w3.org/mike/diffs/html5/spec/Overview.1.1855.html#handler-window-onmessage onchange http://people.w3.org/mike/diffs/html5/spec/Overview.1.1855.html#handler-onchange onkeyup http://people.w3.org/mike/diffs/html5/spec/Overview.1.1855.html#handler-onkeyup http://people.w3.org/mike/diffs/html5/spec/Overview.diff.html http://dev.w3.org/cvsweb/html5/spec/Overview.html?r1=1.1854&r2=1.1855&f=h http://html5.org/tools/web-apps-tracker?from=2684&to=2685 =================================================================== RCS file: /sources/public/html5/spec/Overview.html,v retrieving revision 1.1854 retrieving revision 1.1855 diff -u -d -r1.1854 -r1.1855 --- Overview.html 21 Jan 2009 09:09:26 -0000 1.1854 +++ Overview.html 21 Jan 2009 11:08:09 -0000 1.1855 @@ -5481,7 +5481,6 @@ // <a href=#event-handler-dom-attributes>event handler DOM attributes</a> attribute <a href=#function>Function</a> <a href=#handler-onabort title=handler-onabort>onabort</a>; - attribute <a href=#function>Function</a> <a href=#handler-onbeforeunload title=handler-onbeforeunload>onbeforeunload</a>; attribute <a href=#function>Function</a> <a href=#handler-onblur title=handler-onblur>onblur</a>; attribute <a href=#function>Function</a> <a href=#handler-onchange title=handler-onchange>onchange</a>; attribute <a href=#function>Function</a> <a href=#handler-onclick title=handler-onclick>onclick</a>; @@ -5494,9 +5493,8 @@ 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-onerror title=handler-onerror>onerror</a>; + attribute <a href=#function>Function</a> <a href=#handler-onerror title=handler-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-onhashchange title=handler-onhashchange>onhashchange</a>; attribute <a href=#function>Function</a> <a href=#handler-onkeydown title=handler-onkeydown>onkeydown</a>; attribute <a href=#function>Function</a> <a href=#handler-onkeypress title=handler-onkeypress>onkeypress</a>; attribute <a href=#function>Function</a> <a href=#handler-onkeyup title=handler-onkeyup>onkeyup</a>; @@ -5508,13 +5506,9 @@ attribute <a href=#function>Function</a> <a href=#handler-onmouseover title=handler-onmouseover>onmouseover</a>; attribute <a href=#function>Function</a> <a href=#handler-onmouseup title=handler-onmouseup>onmouseup</a>; attribute <a href=#function>Function</a> <a href=#handler-onmousewheel title=handler-onmousewheel>onmousewheel</a>; - attribute <a href=#function>Function</a> <a href=#handler-onresize title=handler-onresize>onresize</a>; attribute <a href=#function>Function</a> <a href=#handler-onscroll title=handler-onscroll>onscroll</a>; attribute <a href=#function>Function</a> <a href=#handler-onselect title=handler-onselect>onselect</a>; - attribute <a href=#function>Function</a> <a href=#handler-onstorage title=handler-onstorage>onstorage</a>; attribute <a href=#function>Function</a> <a href=#handler-onsubmit title=handler-onsubmit>onsubmit</a>; - attribute <a href=#function>Function</a> <a href=#handler-onunload title=handler-onunload>onunload</a>; - };</pre><p>The <code><a href=#htmlelement>HTMLElement</a></code> interface holds methods and attributes related to a number of disparate features, and the members of this interface are therefore described in various @@ -5532,11 +5526,10 @@ <dd><code title=attr-style><a href=#the-style-attribute>style</a></code></dd> <dd><code title=attr-tabindex><a href=#attr-tabindex>tabindex</a></code></dd> <dd><code title=attr-title><a href=#the-title-attribute>title</a></code></dd> - </dl><p>In addition, the following <a href=#event-handler-content-attributes>event handler content - attributes</a> may be specified on any <a href=#html-elements title="HTML - elements">HTML element</a>:<dl class=element><dt>Event handler content attributes:</dt> + </dl><p>In addition, unless otherwise specified, the following + <a href=#event-handler-content-attributes>event handler content attributes</a> may be specified on + any <a href=#html-elements title="HTML elements">HTML element</a>:<dl class=element><dt>Event handler content attributes:</dt> <dd><code title=handler-onabort><a href=#handler-onabort>onabort</a></code></dd> - <dd><code title=handler-onbeforeunload><a href=#handler-onbeforeunload>onbeforeunload</a></code></dd> <dd><code title=handler-onblur><a href=#handler-onblur>onblur</a></code></dd> <dd><code title=handler-onchange><a href=#handler-onchange>onchange</a></code></dd> <dd><code title=handler-onclick><a href=#handler-onclick>onclick</a></code></dd> @@ -5549,27 +5542,26 @@ <dd><code title=handler-ondragover><a href=#handler-ondragover>ondragover</a></code></dd> <dd><code title=handler-ondragstart><a href=#handler-ondragstart>ondragstart</a></code></dd> <dd><code title=handler-ondrop><a href=#handler-ondrop>ondrop</a></code></dd> - <dd><code title=handler-onerror><a href=#handler-onerror>onerror</a></code></dd> + <dd><code title=handler-onerror><a href=#handler-onerror>onerror</a></code>*</dd> <dd><code title=handler-onfocus><a href=#handler-onfocus>onfocus</a></code></dd> - <dd><code title=handler-onhashchange><a href=#handler-onhashchange>onhashchange</a></code></dd> <dd><code title=handler-onkeydown><a href=#handler-onkeydown>onkeydown</a></code></dd> <dd><code title=handler-onkeypress><a href=#handler-onkeypress>onkeypress</a></code></dd> <dd><code title=handler-onkeyup><a href=#handler-onkeyup>onkeyup</a></code></dd> <dd><code title=handler-onload><a href=#handler-onload>onload</a></code></dd> - <dd><code title=handler-onmessage><a href=#handler-onmessage>onmessage</a></code></dd> + <dd><code title=handler-onmessage><a href=#handler-onmessage>onmessage</a></code>*</dd> <dd><code title=handler-onmousedown><a href=#handler-onmousedown>onmousedown</a></code></dd> <dd><code title=handler-onmousemove><a href=#handler-onmousemove>onmousemove</a></code></dd> <dd><code title=handler-onmouseout><a href=#handler-onmouseout>onmouseout</a></code></dd> <dd><code title=handler-onmouseover><a href=#handler-onmouseover>onmouseover</a></code></dd> <dd><code title=handler-onmouseup><a href=#handler-onmouseup>onmouseup</a></code></dd> <dd><code title=handler-onmousewheel><a href=#handler-onmousewheel>onmousewheel</a></code></dd> - <dd><code title=handler-onresize><a href=#handler-onresize>onresize</a></code></dd> <dd><code title=handler-onscroll><a href=#handler-onscroll>onscroll</a></code></dd> <dd><code title=handler-onselect><a href=#handler-onselect>onselect</a></code></dd> - <dd><code title=handler-onstorage><a href=#handler-onstorage>onstorage</a></code></dd> <dd><code title=handler-onsubmit><a href=#handler-onsubmit>onsubmit</a></code></dd> - <dd><code title=handler-onunload><a href=#handler-onunload>onunload</a></code></dd> - </dl><p>Also, <a href=#custom-data-attribute title="custom data attribute">custom data + </dl><p class=note>The two attributes marked with an asterisk, <code title=handler-onerror><a href=#handler-onerror>onerror</a></code> and <code title=handler-onmessage><a href=#handler-onmessage>onmessage</a></code>, cannot be specified on + <code><a href=#the-body-element>body</a></code> elements as those elements expose <a href=#event-handler-attributes-0>event + handler attributes</a> of the <code><a href=#window>Window</a></code> object with the + same names.</p><hr><p>Also, <a href=#custom-data-attribute title="custom data attribute">custom data attributes</a> (e.g. <code title="">data-foldername</code> or <code title="">data-msgid</code>) can be specified on any <a href=#html-elements title="HTML elements">HTML element</a>, to store custom data specific to the page.<p>In <a href=#html-documents>HTML documents</a>, elements in the <a href=#html-namespace-0>HTML @@ -8594,10 +8586,30 @@ <dt>Content model:</dt> <dd><a href=#flow-content-0>Flow content</a>.</dd> <dt>Element-specific attributes:</dt> - <dd>None.</dd> + <dd><code title=handler-window-onbeforeunload><a href=#handler-window-onbeforeunload>onbeforeunload</a></code></dd> + <dd><code title=handler-window-onerror><a href=#handler-window-onerror>onerror</a></code></dd> + <dd><code title=handler-window-onhashchange><a href=#handler-window-onhashchange>onhashchange</a></code></dd> + <dd><code title=handler-window-onload><a href=#handler-window-onload>onload</a></code></dd> + <dd><code title=handler-window-onmessage><a href=#handler-window-onmessage>onmessage</a></code></dd> + <dd><code title=handler-window-ononline><a href=#handler-window-ononline>ononline</a></code></dd> + <dd><code title=handler-window-onoffline><a href=#handler-window-onoffline>onoffline</a></code></dd> + <dd><code title=handler-window-onresize><a href=#handler-window-onresize>onresize</a></code></dd> + <dd><code title=handler-window-onstorage><a href=#handler-window-onstorage>onstorage</a></code></dd> + <dd><code title=handler-window-onunload><a href=#handler-window-onunload>onunload</a></code></dd> <dt>DOM interface:</dt> <dd> -<pre class=idl>interface <dfn id=htmlbodyelement>HTMLBodyElement</dfn> : <a href=#htmlelement>HTMLElement</a> {};</pre> +<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 <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>; + attribute <a href=#function>Function</a> <a href=#handler-window-ononline title=handler-window-ononline>ononline</a>; + attribute <a href=#function>Function</a> <a href=#handler-window-onoffline title=handler-window-onoffline>onoffline</a>; + attribute <a href=#function>Function</a> <a href=#handler-window-onresize title=handler-window-onresize>onresize</a>; + attribute <a href=#function>Function</a> <a href=#handler-window-onstorage title=handler-window-onstorage>onstorage</a>; + attribute <a href=#function>Function</a> <a href=#handler-window-onunload title=handler-window-onunload>onunload</a>; +};</pre> </dd> </dl><p>The <code><a href=#the-body-element>body</a></code> element represents the main content of the document.<p>In conforming documents, there is only one <code><a href=#the-body-element>body</a></code> @@ -8607,7 +8619,20 @@ <a href=#dnd>drag and drop</a> model) are defined in terms of "<a href=#the-body-element-1>the body element</a>". This refers to a particular element in the DOM, as per the definition of the term, and not any arbitrary - <code><a href=#the-body-element>body</a></code> element.<h4 id=the-section-element><span class=secno>4.4.2 </span>The <dfn><code>section</code></dfn> element</h4><dl class=element><dt>Categories</dt> + <code><a href=#the-body-element>body</a></code> element.<p>The <code><a href=#the-body-element>body</a></code> element exposes as <a href=#event-handler-content-attributes>event handler + content attributes</a> a number of the <a href=#event-handler-attributes-0>event handler + attributes</a> of the <code><a href=#window>Window</a></code> object. It also mirrors + their <a href=#event-handler-dom-attributes>event handler DOM attributes</a>.<p>The <code title=handler-window-onerror><a href=#handler-window-onerror>onerror</a></code> and <code title=handler-window-onmessage><a href=#handler-window-onmessage>onmessage</a></code> <a href=#event-handler-attributes-0>event + handler attributes</a> of the <code><a href=#window>Window</a></code> object, exposed + on the <code><a href=#the-body-element>body</a></code> element, shadow the generic <code title=handler-onerror><a href=#handler-onerror>onerror</a></code> and <code title=handler-onmessage><a href=#handler-onmessage>onmessage</a></code> <a href=#event-handler-attributes-0>event handler + attributes</a> normally supported by <a href=#html-elements>HTML + elements</a>.<p class=example>Thus, for example, a bubbling <code title=event-message><a href=#event-message>message</a></code> event fired on a child of + <a href=#the-body-element-1>the <code>body</code> element</a> of a + <code>Document</code> would trigger the <code title=handler-onmessage><a href=#handler-onmessage>onmessage</a></code> <a href=#event-handler-content-attributes>event handler + content attributes</a> of that element and of the root + <code><a href=#the-html-element>html</a></code> element, but would not trigger the <code title=handler-window-onmessage><a href=#handler-window-onmessage>onmessage</a></code> <a href=#event-handler-content-attributes title="event + handler content attributes">event handler content attribute</a> + on the <code><a href=#the-body-element>body</a></code> element.<h4 id=the-section-element><span class=secno>4.4.2 </span>The <dfn><code>section</code></dfn> element</h4><dl class=element><dt>Categories</dt> <dd><a href=#flow-content-0>Flow content</a>.</dd> <dd><a href=#sectioning-content-0>Sectioning content</a>.</dd> <dt>Contexts in which this element may be used:</dt> @@ -27260,7 +27285,7 @@ // <a href=#event-handler-dom-attributes>event handler DOM attributes</a> attribute <a href=#function>Function</a> <a href=#handler-onabort title=handler-onabort>onabort</a>; - attribute <a href=#function>Function</a> <a href=#handler-onbeforeunload title=handler-onbeforeunload>onbeforeunload</a>; + attribute <a href=#function>Function</a> <a href=#handler-window-onbeforeunload title=handler-window-onbeforeunload>onbeforeunload</a>; attribute <a href=#function>Function</a> <a href=#handler-onblur title=handler-onblur>onblur</a>; attribute <a href=#function>Function</a> <a href=#handler-onchange title=handler-onchange>onchange</a>; attribute <a href=#function>Function</a> <a href=#handler-onclick title=handler-onclick>onclick</a>; @@ -27273,26 +27298,26 @@ 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-onerror title=handler-onerror>onerror</a>; + attribute any <!-- --> <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-onhashchange title=handler-onhashchange>onhashchange</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>; attribute <a href=#function>Function</a> <a href=#handler-onkeypress title=handler-onkeypress>onkeypress</a>; attribute <a href=#function>Function</a> <a href=#handler-onkeyup title=handler-onkeyup>onkeyup</a>; - attribute <a href=#function>Function</a> <a href=#handler-onload title=handler-onload>onload</a>; - attribute <a href=#function>Function</a> <a href=#handler-onmessage title=handler-onmessage>onmessage</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>; attribute <a href=#function>Function</a> <a href=#handler-onmousedown title=handler-onmousedown>onmousedown</a>; attribute <a href=#function>Function</a> <a href=#handler-onmousemove title=handler-onmousemove>onmousemove</a>; attribute <a href=#function>Function</a> <a href=#handler-onmouseout title=handler-onmouseout>onmouseout</a>; attribute <a href=#function>Function</a> <a href=#handler-onmouseover title=handler-onmouseover>onmouseover</a>; attribute <a href=#function>Function</a> <a href=#handler-onmouseup title=handler-onmouseup>onmouseup</a>; attribute <a href=#function>Function</a> <a href=#handler-onmousewheel title=handler-onmousewheel>onmousewheel</a>; - attribute <a href=#function>Function</a> <a href=#handler-onresize title=handler-onresize>onresize</a>; + attribute <a href=#function>Function</a> <a href=#handler-window-onresize title=handler-window-onresize>onresize</a>; attribute <a href=#function>Function</a> <a href=#handler-onscroll title=handler-onscroll>onscroll</a>; attribute <a href=#function>Function</a> <a href=#handler-onselect title=handler-onselect>onselect</a>; - attribute <a href=#function>Function</a> <a href=#handler-onstorage title=handler-onstorage>onstorage</a>; + attribute <a href=#function>Function</a> <a href=#handler-window-onstorage title=handler-window-onstorage>onstorage</a>; attribute <a href=#function>Function</a> <a href=#handler-onsubmit title=handler-onsubmit>onsubmit</a>; - attribute <a href=#function>Function</a> <a href=#handler-onunload title=handler-onunload>onunload</a>; + attribute <a href=#function>Function</a> <a href=#handler-window-onunload title=handler-window-onunload>onunload</a>; };</pre><!-- XXX http://msdn.microsoft.com/workshop/author/dhtml/reference/objects/obj_window.asp http://www.mozilla.org/docs/dom/domref/dom_window_ref.html http://lxr.mozilla.org/mozilla/source/dom/public/idl/base/nsIDOMWindow.idl - scrollBy, etc @@ -27631,7 +27656,8 @@ <code><a href=#script>script</a></code> element belongs.</dd> - <dt>If a script is in an <a href=#event-handler-content-attributes title="event handler content attributes">event handler content attribute</a></dt> + <dt>If a script is in an <a href=#event-handler-content-attributes title="event handler content + attributes">event handler content attribute</a></dt> <dd>The owner is the <code>Document</code> to which the attribute node belongs.</dd> @@ -28419,19 +28445,25 @@ </div><p class=note>The rules for <a href=#create-a-script title="create a script">creating a script</a> include making the script not execute (and just return void) in certain cases, e.g. in a sandbox or when the user - has disabled scripting altogether.<h4 id=events><span class=secno>5.4.6 </span>Events</h4><h5 id=event-handler-attributes><span class=secno>5.4.6.1 </span>Event handler attributes</h5><!-- http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E%0A...%3Cscript%3E%0Aw(a%3Ddocument.implementation.createDocument(null%2C%20null%2C%20null))%3B%0Aw(a.appendChild(a.createElementNS('http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml'%2C%20'html')))%3B%0Aw(b%3Da.firstChild.appendChild(a.createElementNS('http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml'%2C%20'body')))%3B%0Aw(b.test%20%3D%20w)%3B%0Aw(b.setAttribute('onclick'%2C%20'test(%22fire%3A%20%22%20%2B%20event)'))%3B%0Aw(b.onclick)%3B%0Aw(e%3Da.createEvent('Event'))%3B%0Aw(e.initEvent('click'%2C%20false%2C%20false))%3B%0Aw(b.dispatchEvent(e))%3B%0A%3C%2Fscript%3E --><p>Many objects can have <dfn id=event-handler-attributes-0>event handler attributes</dfn> + has disabled scripting altogether.<h4 id=events><span class=secno>5.4.6 </span>Events</h4><h5 id=event-handler-attributes><span class=secno>5.4.6.1 </span>Event handler attributes</h5><!--test: <a href="http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E%0A...%3Cscript%3E%0Aw(a%3Ddocument.implementation.createDocument(null%2C%20null%2C%20null))%3B%0Aw(a.appendChild(a.createElementNS('http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml'%2C%20'html')))%3B%0Aw(b%3Da.firstChild.appendChild(a.createElementNS('http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml'%2C%20'body')))%3B%0Aw(b.test%20%3D%20w)%3B%0Aw(b.setAttribute('onclick'%2C%20'test(%22fire%3A%20%22%20%2B%20event)'))%3B%0Aw(b.onclick)%3B%0Aw(e%3Da.createEvent('Event'))%3B%0Aw(e.initEvent('click'%2C%20false%2C%20false))%3B%0Aw(b.dispatchEvent(e))%3B%0A%3C%2Fscript%3E">test</a>--><p>Many objects can have <dfn id=event-handler-attributes-0>event handler attributes</dfn> specified. These act as bubbling event listeners for the element on - which they are specified.<p>On <a href=#html-elements>HTML elements</a>, each event handler attribute has - two parts, an <a href=#event-handler-content-attributes title="event handler content attributes">event - handler content attribute</a> and an <a href=#event-handler-dom-attributes title="event handler - DOM attributes">event handler DOM attribute</a>. Event handler - attributes must initially be set to null. When their value changes - (through the changing of their event handler content attribute or - their event handler DOM attribute), they will either be null, or - have a <code><a href=#function>Function</a></code> object assigned to them.<p>Objects other than <code>Element</code> objects, in particular - <code><a href=#window>Window</a></code>, only have <a href=#event-handler-dom-attributes title="event handler DOM - attributes">event handler DOM attribute</a> (since they have no - content attributes).</p><hr><p><dfn id=event-handler-content-attributes>Event handler content attributes</dfn>, when specified, must + which they are specified.<p>An <a href=#event-handler-attributes-0 title="event handler attributes">event handler + attribute</a>, unless otherwise specified, can either have the + value null or be set to a <code><a href=#function>Function</a></code> object. Initially, + unless otherwise specified, an event handler attribute must be set + to null.<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>Event handler attributes are exposed in one or two ways.<p>The first way, common to all event handler attributes, is as an + <a href=#event-handler-dom-attributes title="event handler DOM attributes">event handler DOM + attribute</a>.<p>The second way is as as an <a href=#event-handler-content-attributes title="event handler content + attributes">event handler content attribute</a>. Event handlers on + <a href=#html-elements>HTML elements</a> and some of the event handlers on + <code><a href=#window>Window</a></code> objects are exposed in this way.</p><hr><p><dfn id=event-handler-dom-attributes>Event handler DOM attributes</dfn>, on setting, must set the + corresponding event handler attribute to their new value, and on + getting, must return whatever the current value of the corresponding + event handler attribute is (possibly null).<p class=note>Certain event handler DOM attributes have additional + requirements, in particular the <code title=handler-MessagePort-onmessage><a href=#handler-messageport-onmessage>onmessage</a></code> attribute of + <code><a href=#messageport>MessagePort</a></code> objects.</p><hr><p><dfn id=event-handler-content-attributes>Event handler content attributes</dfn>, when specified, must contain valid ECMAScript code matching the ECMAScript <code title="">FunctionBody</code> production. <a href=#references>[ECMA262]</a></p><!-- SCRIPT EXEC --><p>When an event handler content attribute is set, if the element is owned by a <code>Document</code> that is in a <a href=#browsing-context>browsing context</a>, the user agent must run the following steps to @@ -28445,7 +28477,8 @@ attribute's new value as the body of an anonymous function, with the function's arguments set as follows:</p> - <dl class=switch><dt>If the attribute is <code title=handler-onerror><a href=#handler-onerror>onerror</a></code></dt> + <dl class=switch><dt>If the attribute is the <code title=handler-window-onerror><a href=#handler-window-onerror>onerror</a></code> attribute of the + <code><a href=#window>Window</a></code> object</dt> <dd>Let the function have three arguments, named <code title="">event</code>, <code title="">source</code>, and <code title="">fileno</code>.</dd> @@ -28486,10 +28519,7 @@ element owned by a <code>Document</code> that is not in a <a href=#browsing-context>browsing context</a>, the corresponding event handler attribute is not changed.<p class=note>Removing an event handler content attribute does not - reset the corresponding event handler attribute.</p><!-- http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E%0A...%3Cbody%20onload%3D%22w(%27pass%27)%22%3E%0A%3Cscript%3Edocument.body.removeAttribute(%27onload%27)%3B%3C%2Fscript%3E --><p class=XXX>How do we allow non-JS event handlers?</p><hr><p><dfn id=event-handler-dom-attributes>Event handler DOM attributes</dfn>, on setting, must set the - corresponding event handler attribute to their new value, and on - getting, must return whatever the current value of the corresponding - event handler attribute is (possibly null).</p><hr><p>All event handler attributes on an element, whether set to null + reset the corresponding event handler attribute.</p><!-- http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E%0A...%3Cbody%20onload%3D%22w(%27pass%27)%22%3E%0A%3Cscript%3Edocument.body.removeAttribute(%27onload%27)%3B%3C%2Fscript%3E --><p class=XXX>How do we allow non-JS event handlers?</p><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> @@ -28538,216 +28568,251 @@ object implements this interface.<h5 id=event-handler-attributes-on-elements-and-on-window-objects><span class=secno>5.4.6.2 </span>Event handler attributes on elements and on <code><a href=#window>Window</a></code> objects</h5><p>The following are the event handler attributes that must be supported by all <a href=#html-elements>HTML elements</a>, as both content attributes and DOM attributes, and on <code><a href=#window>Window</a></code> objects, - as DOM attributes:<dl><!-- XXX should change 'the element' below to 'the object' or something --><dt><dfn id=handler-onabort title=handler-onabort><code>onabort</code></dfn></dt> + as DOM attributes:<dl><dt><dfn id=handler-onabort title=handler-onabort><code>onabort</code></dfn></dt> <dd><p>Must be invoked whenever an <code title=event-abort><a href=#event-abort>abort</a></code> event is targeted at or bubbles - through the element.</dd> + through the element or object.</dd> <!-- <dt><dfn title="handler-onbeforecopy"><code>onbeforecopy</code></dfn></dt> --><!-- widely used --><!-- <dd><p>Must be invoked whenever a <code title="event-beforecopy">beforecopy</code> event is targeted at or bubbles - through the element.</p></dd> + through the element or object.</p></dd> --> - <dt><dfn id=handler-onbeforeunload title=handler-onbeforeunload><code>onbeforeunload</code></dfn></dt> - - <dd><p>Must be invoked whenever a <code title=event-beforeunload>beforeunload</code> event is targeted at or bubbles - through the element.</dd> - <dt><dfn id=handler-onblur title=handler-onblur><code>onblur</code></dfn></dt> <!-- widely used --> <dd><p>Must be invoked whenever a <code title=event-blur>blur</code> event is targeted at or bubbles - through the element.</dd> + through the element or object.</dd> <dt><dfn id=handler-onchange title=handler-onchange><code>onchange</code></dfn></dt> <!-- widely used --> <dd><p>Must be invoked whenever a <code title=event-change>change</code> event is targeted at or bubbles - through the element.</dd> + through the element or object.</dd> <dt><dfn id=handler-onclick title=handler-onclick><code>onclick</code></dfn></dt> <!-- widely used --> <dd><p>Must be invoked whenever a <code title=event-click>click</code> event is targeted at or bubbles - through the element.</dd> + through the element or object.</dd> <dt><dfn id=handler-oncontextmenu title=handler-oncontextmenu><code>oncontextmenu</code></dfn></dt> <!-- widely used --> <dd><p>Must be invoked whenever a <code title=event-contextmenu>contextmenu</code> event is targeted at or bubbles - through the element.</dd> + through the element or object.</dd> <!-- <dt><dfn title="handler-oncopy"><code>oncopy</code></dfn></dt> --><!-- widely used --><!-- <dd><p>Must be invoked whenever a <code title="event-copy">copy</code> event is targeted at or bubbles - through the element.</p></dd> + through the element or object.</p></dd> --> <dt><dfn id=handler-ondblclick title=handler-ondblclick><code>ondblclick</code></dfn></dt> <!-- widely used --> <dd><p>Must be invoked whenever a <code title=event-dblclick>dblclick</code> event is targeted at or bubbles - through the element.</dd> + through the element or object.</dd> <dt><dfn id=handler-ondrag title=handler-ondrag><code>ondrag</code></dfn></dt> <dd><p>Must be invoked whenever a <code title=event-drag><a href=#event-drag>drag</a></code> event is targeted at or bubbles - through the element.</dd> + through the element or object.</dd> <dt><dfn id=handler-ondragend title=handler-ondragend><code>ondragend</code></dfn></dt> <dd><p>Must be invoked whenever a <code title=event-dragend><a href=#event-dragend>dragend</a></code> event is targeted at or bubbles - through the element.</dd> + through the element or object.</dd> <dt><dfn id=handler-ondragenter title=handler-ondragenter><code>ondragenter</code></dfn></dt> <dd><p>Must be invoked whenever a <code title=event-dragenter><a href=#event-dragenter>dragenter</a></code> event is targeted at or bubbles - through the element.</dd> + through the element or object.</dd> <dt><dfn id=handler-ondragleave title=handler-ondragleave><code>ondragleave</code></dfn></dt> <dd><p>Must be invoked whenever a <code title=event-dragleave><a href=#event-dragleave>dragleave</a></code> event is targeted at or bubbles - through the element.</dd> + through the element or object.</dd> <dt><dfn id=handler-ondragover title=handler-ondragover><code>ondragover</code></dfn></dt> <dd><p>Must be invoked whenever a <code title=event-dragover><a href=#event-dragover>dragover</a></code> event is targeted at or bubbles - through the element.</dd> + through the element or object.</dd> <dt><dfn id=handler-ondragstart title=handler-ondragstart><code>ondragstart</code></dfn></dt> <!-- widely used --> <dd><p>Must be invoked whenever a <code title=event-dragstart><a href=#event-dragstart>dragstart</a></code> event is targeted at or bubbles - through the element.</dd> + through the element or object.</dd> <dt><dfn id=handler-ondrop title=handler-ondrop><code>ondrop</code></dfn></dt> <dd><p>Must be invoked whenever a <code title=event-drop><a href=#event-drop>drop</a></code> event is targeted at or bubbles - through the element.</dd> - - <dt><dfn id=handler-onerror title=handler-onerror><code>onerror</code></dfn></dt> <!-- widely used --> - - <dd><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 element.</p> - - <p>Unlike other event handler attributes, the <code title=handler-onerror><a href=#handler-onerror>onerror</a></code> event handler attribute can - have any value. The initial value of <code title=handler-onerror><a href=#handler-onerror>onerror</a></code> must be - <code>undefined</code>.</p> - - <p class=note>The <code title=handler-onerror><a href=#handler-onerror>onerror</a></code> - handler is also used for <a href=#runtime-script-errors>reporting - script errors</a>.</dd> + through the element or object.</dd> <dt><dfn id=handler-onfocus title=handler-onfocus><code>onfocus</code></dfn></dt> <!-- widely used --> <dd><p>Must be invoked whenever a <code title=event-focus>focus</code> event is targeted at or bubbles - through the element.</dd> - - <dt><dfn id=handler-onhashchange title=handler-onhashchange><code>onhashchange</code></dfn></dt> <!-- new in html5 --> - - <dd><p>Must be invoked whenever a <code title=event-hashchange>hashchange</code> event is targeted at or bubbles - through the element.</dd> + through the element or object.</dd> <dt><dfn id=handler-onkeydown title=handler-onkeydown><code>onkeydown</code></dfn></dt> <!-- widely used --> <dd><p>Must be invoked whenever a <code title=event-keydown>keydown</code> event is targeted at or bubbles - through the element.</dd> + through the element or object.</dd> <dt><dfn id=handler-onkeypress title=handler-onkeypress><code>onkeypress</code></dfn></dt> <!-- widely used --> <dd><p>Must be invoked whenever a <code title=event-keypress>keypress</code> event is targeted at or bubbles - through the element.</dd> + through the element or object.</dd> <dt><dfn id=handler-onkeyup title=handler-onkeyup><code>onkeyup</code></dfn></dt> <!-- widely used --> <dd><p>Must be invoked whenever a <code title=event-keyup>keyup</code> event is targeted at or bubbles - through the element.</dd> - - <dt><dfn id=handler-onload title=handler-onload><code>onload</code></dfn></dt> <!-- widely used --> - - <dd><p>Must be invoked whenever a <code title=event-load><a href=#event-load>load</a></code> event is targeted at or bubbles - through the element.</dd> - - <dt><dfn id=handler-onmessage title=handler-onmessage><code>onmessage</code></dfn></dt> <!-- introduced for <eventsource> --> - - <dd><p>Must be invoked whenever a <code title=event-message><a href=#event-message>message</a></code> event is targeted at or bubbles - through the element.</dd> + through the element or object.</dd> <dt><dfn id=handler-onmousedown title=handler-onmousedown><code>onmousedown</code></dfn></dt> <!-- widely used --> <dd><p>Must be invoked whenever a <code title=event-mousedown>mousedown</code> event is targeted at or bubbles - through the element.</dd> + through the element or object.</dd> <dt><dfn id=handler-onmousemove title=handler-onmousemove><code>onmousemove</code></dfn></dt> <!-- widely used --> <dd><p>Must be invoked whenever a <code title=event-mousemove>mousemove</code> event is targeted at or bubbles - through the element.</dd> + through the element or object.</dd> <dt><dfn id=handler-onmouseout title=handler-onmouseout><code>onmouseout</code></dfn></dt> <!-- widely used --> <dd><p>Must be invoked whenever a <code title=event-mouseout>mouseout</code> event is targeted at or bubbles - through the element.</dd> + through the element or object.</dd> <dt><dfn id=handler-onmouseover title=handler-onmouseover><code>onmouseover</code></dfn></dt> <!-- widely used --> <dd><p>Must be invoked whenever a <code title=event-mouseover>mouseover</code> event is targeted at or bubbles - through the element.</dd> + through the element or object.</dd> <dt><dfn id=handler-onmouseup title=handler-onmouseup><code>onmouseup</code></dfn></dt> <!-- widely used --> <dd><p>Must be invoked whenever a <code title=event-mouseup>mouseup</code> event is targeted at or bubbles - through the element.</dd> + through the element or object.</dd> <dt><dfn id=handler-onmousewheel title=handler-onmousewheel><code>onmousewheel</code></dfn></dt> <!-- widely used --> <dd><p>Must be invoked whenever a <code title=event-mousewheel>mousewheel</code> event is targeted at or bubbles - through the element.</dd> + through the element or object.</dd> <!-- <dt><dfn title="handler-onpaste"><code>onpaste</code></dfn></dt> --><!-- widely used --><!-- <dd><p>Must be invoked whenever a <code title="event-paste">paste</code> event is targeted at or bubbles - through the element.</p></dd> + through the element or object.</p></dd> --> - <dt><dfn id=handler-onresize title=handler-onresize><code>onresize</code></dfn></dt> <!-- widely used --> - - <dd><p>Must be invoked whenever a <code title=event-resize>resize</code> event is targeted at or bubbles - through the element.</dd> <!-- XXX should define when it fires --> - <dt><dfn id=handler-onscroll title=handler-onscroll><code>onscroll</code></dfn></dt> <!-- widely used --> <dd><p>Must be invoked whenever a <code title=event-scroll>scroll</code> event is targeted at or bubbles - through the element.</dd> <!-- XXX should define when it fires --> + through the element or object.</dd> <!-- XXX should define when it fires --> <dt><dfn id=handler-onselect title=handler-onselect><code>onselect</code></dfn></dt> <!-- widely used --> <dd><p>Must be invoked whenever a <code title=event-select><a href=#event-select>select</a></code> event is targeted at or bubbles - through the element.</dd> <!-- XXX should define when it fires --> + through the element or object.</dd> <!-- XXX should define when it fires --> <!--XXX <dt><dfn title="handler-onselectstart"><code>onselectstart</code></dfn></dt> --><!-- widely used --><!-- <dd><p>Must be invoked whenever a <code title="event-selectstart">selectstart</code> event is targeted at or bubbles - through the element.</p></dd> + through the element or object.</p></dd> --> <!-- XXX should define when it fires --> - <dt><dfn id=handler-onstorage title=handler-onstorage><code>onstorage</code></dfn></dt> <!-- new --> + <dt><dfn id=handler-onsubmit title=handler-onsubmit><code>onsubmit</code></dfn></dt> <!-- widely used --> - <dd><p>Must be invoked whenever a <code title=event-storage><a href=#event-storage>storage</a></code> event is targeted at or bubbles + <dd><p>Must be invoked whenever a <code title=event-submit>submit</code> event is targeted at or bubbles + through the element or object.</dd> + + </dl><hr><p>The following are the event handler attributes that must be + supported by all <a href=#html-elements>HTML elements</a> other than + <code><a href=#the-body-element>body</a></code>, as both content attributes and DOM + attributes:<dl><dt><dfn id=handler-onerror title=handler-onerror><code>onerror</code></dfn></dt> + + <dd><p>Must be invoked whenever a <code title=event-error><a href=#event-error>error</a></code> event is targeted at or bubbles through the element.</dd> - <dt><dfn id=handler-onsubmit title=handler-onsubmit><code>onsubmit</code></dfn></dt> <!-- widely used --> + <dt><dfn id=handler-onload title=handler-onload><code>onload</code></dfn></dt> - <dd><p>Must be invoked whenever a <code title=event-submit>submit</code> event is targeted at or bubbles + <dd><p>Must be invoked whenever a <code title=event-load><a href=#event-load>load</a></code> event is targeted at or bubbles through the element.</dd> - <dt><dfn id=handler-onunload title=handler-onunload><code>onunload</code></dfn></dt> <!-- widely used --> + <dt><dfn id=handler-onmessage title=handler-onmessage><code>onmessage</code></dfn></dt> <!-- new for <eventsource> --> - <dd><p>Must be invoked whenever an <code title=event-unload>unload</code> event is targeted at or bubbles + <dd><p>Must be invoked whenever a <code title=event-message><a href=#event-message>message</a></code> event is targeted at or bubbles through the element.</dd> + </dl><hr><p>The following are the event handler attributes that must be + supported by <code><a href=#window>Window</a></code> objects, as DOM attributes on the + <code><a href=#window>Window</a></code> object, and with corresponding content + attributes and DOM attributes exposed on the <code><a href=#the-body-element>body</a></code> + element:<dl><dt><dfn id=handler-window-onbeforeunload title=handler-window-onbeforeunload><code>onbeforeunload</code></dfn></dt> + + <dd><p>Must be invoked whenever a <code title=event-beforeunload>beforeunload</code> event is targeted at or bubbles + through the element or object.</dd> + + <dt><dfn id=handler-window-onerror title=handler-window-onerror><code>onerror</code></dfn></dt> + + <dd> + + <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> + + </dd> + + <dt><dfn id=handler-window-onhashchange title=handler-window-onhashchange><code>onhashchange</code></dfn></dt> <!-- new --> + + <dd><p>Must be invoked whenever a <code title=event-hashchange>hashchange</code> event is targeted at or bubbles + through the object.</dd> + + <dt><dfn id=handler-window-onload title=handler-window-onload><code>onload</code></dfn></dt> <!-- widely used --> + + <dd><p>Must be invoked whenever a <code title=event-load><a href=#event-load>load</a></code> event is targeted at or bubbles + through the object.</dd> + + <dt><dfn id=handler-window-onmessage title=handler-window-onmessage><code>onmessage</code></dfn></dt> <!-- new for postMessage --> + + <dd><p>Must be invoked whenever a <code title=event-message><a href=#event-message>message</a></code> event is targeted at or bubbles + through the object.</dd> + + <dt><dfn id=handler-window-onoffline title=handler-window-onoffline><code>onoffline</code></dfn></dt> <!-- new --> + + <dd><p>Must be invoked whenever a <code title=event-offline><a href=#event-offline>offline</a></code> event is targeted at or bubbles + through the object.</dd> + + <dt><dfn id=handler-window-ononline title=handler-window-ononline><code>ononline</code></dfn></dt> <!-- new --> + + <dd><p>Must be invoked whenever a <code title=event-online><a href=#event-online>online</a></code> event is targeted at or bubbles + through the object.</dd> + + <dt><dfn id=handler-window-onresize title=handler-window-onresize><code>onresize</code></dfn></dt> <!-- widely used --> + + <dd><p>Must be invoked whenever a <code title=event-resize>resize</code> event is targeted at or bubbles + through the object.</dd> <!-- XXX should define when it fires --> + + <dt><dfn id=handler-window-onstorage title=handler-window-onstorage><code>onstorage</code></dfn></dt> <!-- new --> + + <dd><p>Must be invoked whenever a <code title=event-storage><a href=#event-storage>storage</a></code> event is targeted at or bubbles + through the object.</dd> + + <dt><dfn id=handler-window-onunload title=handler-window-onunload><code>onunload</code></dfn></dt> <!-- widely used --> + + <dd><p>Must be invoked whenever an <code title=event-unload>unload</code> event is targeted at or bubbles + through the object.</dd> + </dl><h5 id=event-firing><span class=secno>5.4.6.3 </span>Event firing</h5><p class=XXX>maybe this should be moved higher up (terminology? conformance? DOM?) Also, the whole terminology thing should be changed so that we don't define any specific events here, @@ -28807,15 +28872,15 @@ </ol><h5 id=runtime-script-errors><span class=secno>5.4.6.5 </span>Runtime script errors</h5><p><em>This section only applies to user agents that support scripting in general and ECMAScript in particular.</em><p>Whenever a runtime script error occurs in one of the scripts - 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 + associated with a <code>Document</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-handler-attributes-0 title="event + handler attributes">event handler attribute</a> of the + <a href=#script-s-global-object>script's global object</a>. If the error is still <i title="">not handled</i> after this, then the error should 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 - 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>:<dl class=switch><dt>If the value of <var title="">onerror</var> is a + event handler 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>:<dl class=switch><dt>If the value of <var title="">onerror</var> is a <code><a href=#function>Function</a></code></dt> <dd> @@ -30891,9 +30956,9 @@ <li><p>Unassociate <var title="">document</var> from <var title="">cache</var> and instead associate it with <var title="">new cache</var>.</li> - </ol><p>The following are the <a href=#event-handler-dom-attributes>event handler DOM attributes</a> - that must be supported by objects implementing the - <code><a href=#applicationcache>ApplicationCache</a></code> interface:<dl><dt><dfn id=handler-appcache-onchecking title=handler-appcache-onchecking><code>onchecking</code></dfn></dt> + </ol><p>The following are the <a href=#event-handler-attributes-0>event handler attributes</a> that + must be supported, as DOM attributes, by all objects implementing + the <code><a href=#applicationcache>ApplicationCache</a></code> interface:<dl><dt><dfn id=handler-appcache-onchecking title=handler-appcache-onchecking><code>onchecking</code></dfn></dt> <dd><p>Must be invoked whenever an <code title=event-checking>checking</code> event is targeted at or bubbles through the <code><a href=#applicationcache>ApplicationCache</a></code> object.</dd> @@ -30954,7 +31019,7 @@ of the <code><a href=#window>Window</a></code> changes from false to true, the user agent must <a href=#fire-a-simple-event>fire a simple event</a> called <dfn id=event-online title=event-online><code>online</code></dfn> at <a href=#the-body-element-1>the body element</a>.<p class=note>This attribute is inherently unreliable. A computer - can be connected to a network without having Internet access.</p><!-- XXX ononline onoffline need to be defined --><h3 id=history><span class=secno>5.8 </span>Session history and navigation</h3><h4 id=the-session-history-of-browsing-contexts><span class=secno>5.8.1 </span>The session history of browsing contexts</h4><p>The sequence of <code>Document</code>s in a <a href=#browsing-context>browsing + can be connected to a network without having Internet access.<h3 id=history><span class=secno>5.8 </span>Session history and navigation</h3><h4 id=the-session-history-of-browsing-contexts><span class=secno>5.8.1 </span>The session history of browsing contexts</h4><p>The sequence of <code>Document</code>s in a <a href=#browsing-context>browsing context</a> is its <dfn id=session-history>session history</dfn>.<p><code><a href=#history-1>History</a></code> objects provide a representation of the pages in the session history of <a href=#browsing-context title="browsing context">browsing contexts</a>. Each browsing context has a @@ -35967,9 +36032,9 @@ the server, or by a network error).<p class=note>No information regarding why the connection was closed is passed to the application in this version of this specification.<p>The <code title=event-message><a href=#event-message>message</a></code> event is fired - when when data is received for a connection.</p><hr><p>The following are the <a href=#event-handler-dom-attributes>event handler DOM attributes</a> - that must be supported by objects implementing the - <code><a href=#websocket>WebSocket</a></code> interface:<dl><dt><dfn id=handler-websocket-onopen title=handler-WebSocket-onopen><code>onopen</code></dfn></dt> + when when data is received for a connection.</p><hr><p>The following are the <a href=#event-handler-attributes-0>event handler attributes</a> that + must be supported, as DOM attributes, by all objects implementing + the <code><a href=#websocket>WebSocket</a></code> interface:<dl><dt><dfn id=handler-websocket-onopen title=handler-WebSocket-onopen><code>onopen</code></dfn></dt> <dd><p>Must be invoked whenever an <code title=event-WebSocket-open><a href=#event-websocket-open>open</a></code> event is targeted at or bubbles through the <code><a href=#websocket>WebSocket</a></code> object.</dd> @@ -37058,9 +37123,9 @@ method, when called on a port <var title="">local port</var> that is entangled with another port, must cause the user agents to unentangle the two ports. If the method is called on a port that is - not entangled, then the method must do nothing.</p><hr><p>The following are the <a href=#event-handler-dom-attributes>event handler DOM attributes</a> - that must be supported by objects implementing the - <code><a href=#messageport>MessagePort</a></code> interface:<dl><dt><dfn id=handler-messageport-onmessage title=handler-MessagePort-onmessage><code>onmessage</code></dfn></dt> + not entangled, then the method must do nothing.</p><hr><p>The following are the <a href=#event-handler-attributes-0>event handler attributes</a> that + must be supported, as DOM attributes, by all objects implementing + the <code><a href=#messageport>MessagePort</a></code> interface:<dl><dt><dfn id=handler-messageport-onmessage title=handler-MessagePort-onmessage><code>onmessage</code></dfn></dt> <dd>
Received on Wednesday, 21 January 2009 11:12:18 UTC