DOM Events

  • Revision slug: DOM_Client_Object_Cross-Reference/DOM_Events
  • Revision title: DOM Events
  • Revision id: 40794
  • Created:
  • Creator: Neil
  • Is current revision? No
  • Comment 4 words added, 2 words removed

Revision Content

{{ NeedsTechnicalReview() }}

Events

Event W3C DOM Level 3{{ Ref("w3c-dom") }} Gecko DOM (FF2){{ Ref("gecko-dom") }} MSHTML DOM (IE){{ Ref("mshtml-dom") }} Cancel Value ({{ mediawiki.external('X') }}HTML)
Bubbles Cancelable Bubbles Cancelable Bubbles Cancelable
User interface event types
DOMActivate yes yes yes ? yes(?) no(?) ?
DOMFocusIn yes no yes ? - -  
DOMFocusOut yes no yes ? - -  
blur no no no ? no no  
focus no no no ? no no  
Text event types
textInput yes yes ? ? - - ?
Mouse event types
click yes yes yes yes yes yes false
mousedown yes yes yes ? yes yes ?
mousemove yes yes yes ? yes no ?
mouseover yes yes yes yes yes yes true
mouseout yes yes yes yes yes no true
mouseup yes yes yes ? yes yes ?
Keyboard event types
keydown yes yes yes yes yes yes false
keyup yes yes yes yes yes no false
keypress (proprietary, see textInput) - - yes yes yes yes false
Mutation and mutation name event types
DOMSubtreeModified yes no yes ? - -  
DOMNodeInserted yes no yes ? - -  
DOMNodeRemoved yes no yes ? - -  
DOMNodeRemovedFromDocument yes no yes ? - -  
DOMNodeInsertedIntoDocument yes no yes ? - -  
DOMAttrModified yes no yes ? - -  
DOMCharacterDataModified yes no yes ? - -  
DOMElementNameChanged yes no yes ? - -  
DOMAttributeNameChanged yes no yes ? - -  
Basic event types
abort yes no yes ? no yes  
beforeunload - - no ? no yes  Any string
change yes no yes ? no yes  
error yes no no yes no yes true
load no no no ? no no  
reset yes yes yes ? no yes ?
resize yes no yes ? no no  
scroll yes no no¹ ? no no  
select yes no yes ? no yes  
submit yes yes yes yes no yes false
unload no no no ? no no  

¹Document scroll events will bubble to the window.

DOM Objects

{{ mediawiki.external('TODO') }}

See also

  1. {{ Note("w3c-dom") }} W3C Document Object Model (DOM) Level 3 Events Specification
  2. {{ Note("gecko-dom") }} Gecko DOM Reference
  3. {{ Note("mshtml-dom") }} {{ MSDN("ms533051", "HTML and DHTML Reference: Events") }}

{{ Block-title("Original Document Information") }}

Revision Source

<p>{{ NeedsTechnicalReview() }} </p>
<h3 name="Events">Events</h3>
<table class="standard-table" style="width: 100%;"> <tbody> <tr> <th rowspan="2">Event</th> <th colspan="2">W3C DOM Level 3{{ Ref("w3c-dom") }}</th> <th colspan="2">Gecko DOM (FF2){{ Ref("gecko-dom") }}</th> <th colspan="2">MSHTML DOM (IE){{ Ref("mshtml-dom") }}</th> <th rowspan="2">Cancel Value ({{ mediawiki.external('X') }}HTML)</th> </tr> <tr> <th>Bubbles</th> <th>Cancelable</th> <th>Bubbles</th> <th>Cancelable</th> <th>Bubbles</th> <th>Cancelable</th> </tr> <tr> <th colspan="8">User interface event types</th> </tr> <tr> <td>DOMActivate</td> <td>yes</td> <td>yes</td> <td>yes</td> <td>?</td> <td>yes(?)</td> <td>no(?)</td> <td>?</td> </tr> <tr> <td>DOMFocusIn</td> <td>yes</td> <td>no</td> <td>yes</td> <td>?</td> <td>-</td> <td>-</td> <td> </td> </tr> <tr> <td>DOMFocusOut</td> <td>yes</td> <td>no</td> <td>yes</td> <td>?</td> <td>-</td> <td>-</td> <td> </td> </tr> <tr> <td>blur</td> <td>no</td> <td>no</td> <td>no</td> <td>?</td> <td>no</td> <td>no</td> <td> </td> </tr> <tr> <td>focus</td> <td>no</td> <td>no</td> <td>no</td> <td>?</td> <td>no</td> <td>no</td> <td> </td> </tr> <tr> <th colspan="8">Text event types</th> </tr> <tr> <td>textInput</td> <td>yes</td> <td>yes</td> <td>?</td> <td>?</td> <td>-</td> <td>-</td> <td>?</td> </tr> <tr> <th colspan="8">Mouse event types</th> </tr> <tr> <td>click</td> <td>yes</td> <td>yes</td> <td>yes</td> <td>yes</td> <td>yes</td> <td>yes</td> <td><code>false</code></td> </tr> <tr> <td>mousedown</td> <td>yes</td> <td>yes</td> <td>yes</td> <td>?</td> <td>yes</td> <td>yes</td> <td>?</td> </tr> <tr> <td>mousemove</td> <td>yes</td> <td>yes</td> <td>yes</td> <td>?</td> <td>yes</td> <td>no</td> <td>?</td> </tr> <tr> <td>mouseover</td> <td>yes</td> <td>yes</td> <td>yes</td> <td>yes</td> <td>yes</td> <td>yes</td> <td><code>true</code></td> </tr> <tr> <td>mouseout</td> <td>yes</td> <td>yes</td> <td>yes</td> <td>yes</td> <td>yes</td> <td>no</td> <td><code>true</code></td> </tr> <tr> <td>mouseup</td> <td>yes</td> <td>yes</td> <td>yes</td> <td>?</td> <td>yes</td> <td>yes</td> <td>?</td> </tr> <tr> <th colspan="8">Keyboard event types</th> </tr> <tr> <td>keydown</td> <td>yes</td> <td>yes</td> <td>yes</td> <td>yes</td> <td>yes</td> <td>yes</td> <td><code>false</code></td> </tr> <tr> <td>keyup</td> <td>yes</td> <td>yes</td> <td>yes</td> <td>yes</td> <td>yes</td> <td>no</td> <td><code>false</code></td> </tr> <tr> <td>keypress (<em>proprietary</em>, see <code>textInput</code>)</td> <td>-</td> <td>-</td> <td>yes</td> <td>yes</td> <td>yes</td> <td>yes</td> <td><code>false</code></td> </tr> <tr> <th colspan="8">Mutation and mutation name event types</th> </tr> <tr> <td>DOMSubtreeModified</td> <td>yes</td> <td>no</td> <td>yes</td> <td>?</td> <td>-</td> <td>-</td> <td> </td> </tr> <tr> <td>DOMNodeInserted</td> <td>yes</td> <td>no</td> <td>yes</td> <td>?</td> <td>-</td> <td>-</td> <td> </td> </tr> <tr> <td>DOMNodeRemoved</td> <td>yes</td> <td>no</td> <td>yes</td> <td>?</td> <td>-</td> <td>-</td> <td> </td> </tr> <tr> <td>DOMNodeRemovedFromDocument</td> <td>yes</td> <td>no</td> <td>yes</td> <td>?</td> <td>-</td> <td>-</td> <td> </td> </tr> <tr> <td>DOMNodeInsertedIntoDocument</td> <td>yes</td> <td>no</td> <td>yes</td> <td>?</td> <td>-</td> <td>-</td> <td> </td> </tr> <tr> <td>DOMAttrModified</td> <td>yes</td> <td>no</td> <td>yes</td> <td>?</td> <td>-</td> <td>-</td> <td> </td> </tr> <tr> <td>DOMCharacterDataModified</td> <td>yes</td> <td>no</td> <td>yes</td> <td>?</td> <td>-</td> <td>-</td> <td> </td> </tr> <tr> <td>DOMElementNameChanged</td> <td>yes</td> <td>no</td> <td>yes</td> <td>?</td> <td>-</td> <td>-</td> <td> </td> </tr> <tr> <td>DOMAttributeNameChanged</td> <td>yes</td> <td>no</td> <td>yes</td> <td>?</td> <td>-</td> <td>-</td> <td> </td> </tr> <tr> <th colspan="8">Basic event types</th> </tr> <tr> <td>abort</td> <td>yes</td> <td>no</td> <td>yes</td> <td>?</td> <td>no</td> <td>yes</td> <td> </td> </tr> <tr> <td>beforeunload</td> <td>-</td> <td>-</td> <td>no</td> <td>?</td> <td>no</td> <td>yes</td> <td> Any string</td> </tr> <tr> <td>change</td> <td>yes</td> <td>no</td> <td>yes</td> <td>?</td> <td>no</td> <td>yes</td> <td> </td> </tr> <tr> <td>error</td> <td>yes</td> <td>no</td> <td>no</td> <td>yes</td> <td>no</td> <td>yes</td> <td><code>true</code></td> </tr> <tr> <td>load</td> <td>no</td> <td>no</td> <td>no</td> <td>?</td> <td>no</td> <td>no</td> <td> </td> </tr> <tr> <td>reset</td> <td>yes</td> <td>yes</td> <td>yes</td> <td>?</td> <td>no</td> <td>yes</td> <td>?</td> </tr> <tr> <td>resize</td> <td>yes</td> <td>no</td> <td>yes</td> <td>?</td> <td>no</td> <td>no</td> <td> </td> </tr> <tr> <td>scroll</td> <td>yes</td> <td>no</td> <td>no¹</td> <td>?</td> <td>no</td> <td>no</td> <td> </td> </tr> <tr> <td>select</td> <td>yes</td> <td>no</td> <td>yes</td> <td>?</td> <td>no</td> <td>yes</td> <td> </td> </tr> <tr> <td>submit</td> <td>yes</td> <td>yes</td> <td>yes</td> <td>yes</td> <td>no</td> <td>yes</td> <td><code>false</code></td> </tr> <tr> <td>unload</td> <td>no</td> <td>no</td> <td>no</td> <td>?</td> <td>no</td> <td>no</td> <td> </td> </tr> </tbody>
</table>
<p>¹Document scroll events will bubble to the window.</p><h3 name="DOM_Objects"> DOM Objects </h3>
<p>{{ mediawiki.external('TODO') }}
</p>
<h3 name="See_also"> See also </h3>
<ol><li> {{ Note("w3c-dom") }} <a class="external" href="http://www.w3.org/TR/DOM-Level-3-Events/">W3C Document Object Model (DOM) Level 3 Events Specification</a>
</li><li> {{ Note("gecko-dom") }} <a href="en/DOM">Gecko DOM Reference</a>
</li><li> {{ Note("mshtml-dom") }} {{ MSDN("ms533051", "HTML and DHTML Reference: Events") }}
</li></ol>
<div class="originaldocinfo">
<p>{{ Block-title("Original Document Information") }}
</p>
<ul><li> Author: Thomas 'PointedEars' Lahn &lt;<a class=" link-mailto" href="mailto:dom@PointedEars.de" rel="freelink">dom@PointedEars.de</a>&gt;
</li><li> Copyright Information: © 2007 by individual MDC contributors (see history); content available under a <a href="Project:en/Copyrights">Creative Commons license</a>
</li></ul>
</div>
Revert to this revision