DOM event reference

Table of contents

  1. 1. DOM events
  2. 2. Specifications
  3. 3. See also
Table of contents
  1. 1. DOM events
  2. 2. Specifications
  3. 3. See also

DRAFT
This page is not complete.

Following events can be captured by adding event handlers by calling a DOM element's element.addEventListener() method.

Note: This page needs content, and the child pages need filling out.

Note that some events listed here may be unimplemented in some or all of the browsers even if the event's description does not say so. Feel free to edit the page to correct it!

DOM events

Event name Event type Targets Specification Description
DOMActivate     DOM L3 Events  
DOMAttrModified MutationEvent   DOM L3 Events Deprecated See Mutation events.
DOMAttributeNameChanged MutationNameEvent   DOM L3 Events Unimplemented at least in Gecko. See Mutation events.
DOMCharacterDataModified MutationEvent   DOM L3 Events Deprecated See Mutation events.
DOMContentLoaded Event   HTML5  
DOMElementNameChanged MutationNameEvent   DOM L3 Events Unimplemented at least in Gecko. See Mutation events.
DOMFocusIn FocusEvent Element DOM L3 Events

Deprecated Use focus, focusin, and focusout events.

Unimplemented in Gecko ( bug 396927 ).

DOMFocusOut FocusEvent Element DOM L3 Events

Deprecated Use focus, focusin, and focusout events.

Unimplemented in Gecko ( bug 396927 ).
DOMNodeInserted MutationEvent   DOM L3 Events Deprecated See Mutation events.
DOMNodeInsertedIntoDocument MutationEvent   DOM L3 Events Deprecated See Mutation events.
DOMNodeRemoved MutationEvent   DOM L3 Events Deprecated See Mutation events.
DOMNodeRemovedFromDocument MutationEvent   DOM L3 Events Deprecated See Mutation events.
DOMSubtreeModified MutationEvent   DOM L3 Events Deprecated See Mutation events.
abort Event (may also be UIEvent and ProgressEvent ) Element , XMLHttpRequest , XMLHttpRequestUpload DOM L3 Events, HTML5, XHR L2 Fired when the transfer of a resource was aborted.
afterprint   Window , <body> , <frameset>   Fired after printing a document has finished. See Detecting print requests for an example. Requires Gecko 6.0
animationend AnimationEvent ?   See CSS animations.
animationiteration AnimationEvent ?   See CSS animations.
animationstart AnimationEvent ?   See CSS animations.
beforeprint   Window , <body> , <frameset>   Fired before printing of a document begins. See Detecting print requests for an example. Requires Gecko 6.0
beforeunload   Window , <body> , <frameset>   IE-specific. Fired before a resource is unloaded (while unload is fired afterward)
blur FocusEvent Element (except <body> and <frameseet>), Document   Fired when an element target loses focus.
callschanged CallEvent   WebTelephony Fired when the list of ongoing phone calls changes.
canplay   HTMLMediaElement HTML5  
canplaythrough   HTMLMediaElement HTML5  
click MouseEvent Element , Document , Window DOM L3 Events  
compositionend CompositionEvent Element DOM L3 Events Requires Gecko 9.0
compositionstart CompositionEvent Element DOM L3 Events Requires Gecko 9.0
compositionupdate CompositionEvent Element DOM L3 Events Requires Gecko 9.0
contextmenu MouseEvent Element HTML5  
cuechange   <track> , TextTrack HTML5  
delivered SmsEvent SmsManager WebSMS API Fired when an SMS is delivered to a recipient.
dblclick MouseEvent Element , Document , Window DOM L3 Events  
drag   Element , Document , Window    
dragend   Element , Document , Window    
dragenter   Element , Document , Window    
dragleave   Element , Document , Window    
dragover   Element , Document , Window    
dragstart   Element , Document , Window    
drop   Element , Document , Window    
durationchange   HTMLMediaElement HTML5  
emptied   HTMLMediaElement HTML5  
ended   HTMLMediaElement HTML5  
error Event (may also be UIEvent and ProgressEvent ) Element , XMLHttpRequest , XMLHttpRequestUpload DOM L3 Events, HTML5, XHR L2 Fired when a resource fails to load (network error, script execution error, etc).
focus FocusEvent Element (except <body> and <frameseet>), Document , Window DOM L3 Events Fired when an element receives focus.
focusin FocusEvent   DOM L3 Events

Fired when an event target is about to receive focus but before the focus is shifted. This event occurs right before the focus event.

Unimplemented in Gecko ( bug 687787 ).

focusout FocusEvent   DOM L3 Events

Fired when an event target is about to lose focus but before the focus is shifted. This event occurs right before the blur event.

Unimplemented in Gecko ( bug 687787 ).

hashchange   Window , <body> , <frameset>    
incoming CallEvent   WebTelephony Fired when a new call is detected.
input Event Element HTML5  
invalid   Element , Document , Window    
keydown KeyboardEvent   DOM L3 Events Fired when a key is initially pressed. This is sent after any key mapping is performed, but before any input method editors receive the keypress. This is sent for any key, even if it doesn't generate a character code.
keypress KeyboardEvent   DOM L3 Events

Fired when a key is initially pressed, but only if that key normally produces a character value. This is sent after any key mapping is performed, but before any input method editors receive the keypress.

Note: This is sent in addition to, not instead of, the keydown event.

This event has been deprecated in favor of textinput.

keyup KeyboardEvent   DOM L3 Events Fired when a key is released. This is sent after any key mapping is performed, and always follows the corresponding keydown and keypress events.
load Event (may also be UIEvent and ProgressEvent ) Element , Document , Window , XMLHttpRequest , XMLHttpRequestUpload DOM L3 Events, XHR L2 Fired when the resource (document, element, defaultView) and depending resources (images, script downloading and execution, css loading, etc.) are loaded.
loadeddata   HTMLMediaElement HTML5  
loadedmetadata   HTMLMediaElement HTML5  
loadend ProgressEvent XMLHttpRequest XHR L2  
loadstart Event (may be ProgressEvent ) HTMLMediaElement , XMLHttpRequest , XMLHttpRequestUpload HTML5, XHR L2  
message   Window , <body> , <frameset>    
mousedown MouseEvent Element , Document , Window DOM L3 Events  
mouseenter MouseEvent   DOM L3 Events Fired when entering an element or any of its descendants.
mouseleave MouseEvent   DOM L3 Events Fired when leaving an element and all of its descendants.
mousemove MouseEvent Element , Document , Window DOM L3 Events  
mouseout MouseEvent Element , Document , Window DOM L3 Events  
mouseover MouseEvent Element , Document , Window DOM L3 Events  
mouseup MouseEvent Element , Document , Window DOM L3 Events  
mousewheel   Element , Document , Window    
mozfullscreenchange   Document Experimental Sent to a document when an element its contains is granted full-screen mode, or leaves it. See Using full-screen mode for details. Requires Gecko 9.0
offline   Window , <body> , <frameset> HTML5 Can be used on window, document, or document.body, see Online_and_offline_events. Requires Gecko 1.9
online   Window , <body> , <frameset> HTML5 Can be used on window, document, or document.body, see Online_and_offline_events. Requires Gecko 1.9
pagehide   Window , <body> , <frameset>    
pageshow   Window , <body> , <frameset>    
pause   HTMLMediaElement HTML5  
play   HTMLMediaElement HTML5  
playing   HTMLMediaElement HTML5  
popstate   Window , <body> , <frameset>   See window.onpopstate and Manipulating the browser history.
progress Event (may be ProgressEvent ) HTMLMediaElement , XMLHttpRequest , XMLHttpRequestUpload HTML5, XHR L2  
ratechange   HTMLMediaElement HTML5  
readystatechange Event Document , XMLHttpRequest HTML5, XHR L2  
received SmsEvent SmsManager WebSMS API Fired when an SMS is received.
reset   Element , Document , Window    
resize UIEvent Window , <body> , <frameset> DOM L3 Events Fired when the browser window is resized. May apply to <iframe>s.
scroll UIEvent Element , Document , Window DOM L3 Events Fired when a user scrolls a document or an element.
seeked   HTMLMediaElement HTML5  
seeking   HTMLMediaElement HTML5  
select UIEvent Element , Document , Window DOM L3 Events Fired when a user selects some text.
sent SmsEvent SmsManager WebSMS API Fired when an SMS is sent.
show Event HTMLMenuElement HTML5  
stalled   HTMLMediaElement HTML5  
storage StorageEvent Window , <body> , <frameset>    
submit   Element , Document , Window    
suspend   HTMLMediaElement HTML5  
textinput TextInput Element textinput/textInput event was defined in old DOM Level3 Events. However, it was removed. IE and WebKit support this (the event name is textinput on IE, textInput on WebKit), but Gecko doesn't support this ( bug 622245 ).
timeout ProgressEvent XMLHttpRequest , XMLHttpRequestUpload XHR L2  
timeupdate   HTMLMediaElement HTML5  
touchstart TouchEvent Element , Document , Window Touch events v1  
touchmove TouchEvent Element , Document , Window Touch events v1  
touchend TouchEvent Element , Document , Window Touch events v1  
touchcancel TouchEvent Element , Document , Window Touch events v1  
unload UIEvent Window , <body> , <frameset> DOM L3 Events Fired when the resource (document, element, defaultView) or any depending resources (images, CSS file, etc.) is removed from the environment.
volumechange   HTMLMediaElement HTML5  
waiting   HTMLMediaElement HTML5  
wheel WheelEvent Element , Document , Window DOM L3 Events bug 719320

Specifications

DOM Level 3 Events (W3C Working Draft)

Tags (3)

Edit tags

Attachments (0)

 

Attach file