2003-11-07
Document Object Model (DOM) Level 3 Events Specification
http://www.w3.org/TR/2003/NOTE-DOM-Level-3-Events-20031107
Hégaret
Philippe Le
Pixley
Tom
cancelable event
A cancelable event is an event associated with a default action which is allowed to be canceled during the DOM event flow.
dOMActivate
An element is activated, for instance, using a mouse device, a keyboard device, or a voice command. The activation of an element is device dependent but is also application dependent, e.g. a link in a document can be activated using a mouse click or a mouse double click.
dOMFocusIn
An event target receives focus, for instance via a pointing device being moved onto an element or using keyboard navigation. The focus is given to the element before the dispatch of this event type.
dOMFocusOut
A event target loses focus, for instance via a pointing device being moved out of an element or by tabbing navigation out of the element. The focus is taken from the element before the dispatch of this event type.
textInput
One or more characters have been entered. The characters can originate from a variety of sources. For example, it could be characters resulting from a key being pressed or released on a keyboard device, characters resulting from the processing of an input method editor, or resulting from a voice command. Where a "paste" operation generates a simple sequence of characters, i.e. a text without any structure or style information, this event type should be generated as well.
click
A pointing device button is clicked over an element. The definition of a click depends on the environment configuration; i.e. may depend on the screen location or the delay between the press and release of the pointing device button. In any case, the target node must be the same between the mousedown, mouseup, and click. The sequence of these events is: {"http://www.w3.org/2001/xml-events", "mousedown"}, {"http://www.w3.org/2001/xml-events", "mouseup"}, and {"http://www.w3.org/2001/xml-events", "click"}. Note that, given the definition of a click, If one or more of the event types {"http://www.w3.org/2001/xml-events", "mouseover"}, {"http://www.w3.org/2001/xml-events", "mousemove"}, and {"http://www.w3.org/2001/xml-events", "mouseout"} occur between the press and release of the pointing device button, the event type {"http://www.w3.org/2001/xml-events", "click"} cannot occur. In the case of nested elements, this event type is always targeted at the most deeply nested element.
mousedown
A pointing device button is pressed over an element. In the case of nested elements, this event type is always targeted at the most deeply nested element.
mouseup
A pointing device button is released over an element. In the case of nested elements, this event type is always targeted at the most deeply nested element.
mouseover
A pointing device is moved onto an element. In the case of nested elements, this event type is always targeted at the most deeply nested element.
mousemove
A pointing device is moved while it is over an element. In the case of nested elements, this event type is always targeted at the most deeply nested element.
mouseout
A pointing device is moved away from an element. In the case of nested elements, this event type is always targeted at the most deeply nested element.
keydown
A key is pressed down. This event type is device dependent and relies on the capabilities of the input devices and how they are mapped in the operating system. This event type is generated after the keyboard mapping but before the processing of an input method editor. This event should logically happen before the event {"http://www.w3.org/2001/xml-events", "keyup"} is produced. Whether a keydown contributes or not to the generation of a text event is implementation dependent.
keyup
A key is released. This event type is device dependent and relies on the capabilities of the input devices and how they are mapped in the operating system. This event type is generated after the keyboard mapping but before the processing of an input method editor. This event should logically happen after the event {"http://www.w3.org/2001/xml-events", "keydown"} is produced. Whether a keyup contributes or not to the generation of a text event is implementation dependent.
dOMSubtreeModified
This is a general event for notification of all changes to the document. It can be used instead of the more specific events listed below. It may be dispatched after a single modification to the document or, at the implementation's discretion, after multiple changes have occurred. The latter use should generally be used to accommodate multiple changes which occur either simultaneously or in rapid succession. The target of this event is the lowest common parent of the changes which have taken place. This event is dispatched after any other events caused by the mutation(s) have occurred.
dOMNodeInserted
A node has been added as a child of another node. This event is dispatched after the insertion has taken place. The target node of this event is the node being inserted.
dOMNodeRemoved
A node is being removed from its parent node. This event is dispatched before the node is removed from the tree. The target node of this event is the node being removed.
dOMNodeRemovedFromDocument
A node is being removed from a document, either through direct removal of the node or removal of a subtree in which it is contained. This event is dispatched before the removal takes place. The target node of this event type is the node being removed. If the node is being directly removed, the event type {"http://www.w3.org/2001/xml-events", "DOMNodeRemoved"} will fire before this event type.
dOMNodeInsertedIntoDocument
A node is being inserted into a document, either through direct insertion of the node or insertion of a subtree in which it is contained. This event is dispatched after the insertion has taken place. The target node of this event is the node being inserted. If the node is being directly inserted, the event type {"http://www.w3.org/2001/xml-events", "DOMNodeInserted"} will fire before this event type.
dOMAttrModified
Occurs after an Attr has been modified on a node. The target node of this event is the parent Element node whose Attr changed. It is expected that string based replacement of an Attr value will be viewed as a modification of the Attr since its identity does not change. Subsequently replacement of the Attr node with a different Attr node is viewed as the removal of the first Attr node and the addition of the second.
dOMCharacterDataModified
Occurs after CharacterData.data or ProcessingInstruction.data have been modified but the node itself has not been inserted or deleted. The target node of this event is the CharacterData node or the ProcessingInstruction node.
dOMElementNameChanged
Occurs after the namespaceURI and/or the nodeName of an Element node have been modified (e.g., the element was renamed using Document.renameNode()). The target of this event is the renamed Element node.
dOMAttributeNameChanged
Occurs after the namespaceURI and/or the nodeName of a Attr node have been modified (e.g., the attribute was renamed using Document.renameNode). The target of this event is the parent Element node whose Attr has been renamed.
load
The DOM Implementation finishes loading the resource (such as the document) and any dependent resources (such as images, style sheets, or scripts). Dependent resources that fail to load will not prevent this event from firing if the resource that loaded them is still accessible via the DOM. If this event type is dispatched, implementations are required to dispatch this event at least on the Document node.
unload
The DOM implementation removes from the environment the resource (such as the document) or any dependent resources (such as images, style sheets, scripts). The document is unloaded after the dispatch of this event type. If this event type is dispatched, implementations are required to dispatch this event at least on the Document node.
abort
The loading of the document, or a resource linked from it, is stopped before being entirely loaded.
error
The document, or a resource linked from it, has been loaded but cannot be interpreted according to its semantic, such as an invalid image, a script execution error, or non-well-formed XML.
select
A user selects some text. DOM Level 3 Events does not provide contextual information to access the selected text. The selection occured before the dispatch of this event type.
change
A control loses the input focus and its value has been modified since gaining focus.
submit
A form, such as , , or form, is submitted.
reset
A form, such as , , or form, is reset.
resize
A document view or an element has been resized. The resize occured before the dispatch of this event type.
scroll
A document view or an element has been scrolled. The scroll occured before the dispatch of this event type.
load
The DOM implementation finishes loading all content within the BODY element, all frames within a FRAMESET, or any resource linked from the document.
unload
The DOM implementation removes a document from a window or frame. This event is valid for BODY and FRAMESET elements.
abort
The page loading is stopped before an image has been allowed to completely load. This event applies to OBJECT elements.
error
An image does not load properly or when an error occurs during script execution. This event is valid for OBJECT elements, BODY elements, and FRAMESET element.
select
A user selects some text in a text field either via the user interface or via attributes defined in . This event is valid for INPUT and TEXTAREA elements.
change
A control loses the input focus and its value has been modified since gaining focus. This event can occur either via a user interface manipulation or the focus() methods and the attributes defined in . This event is valid for INPUT, SELECT, and TEXTAREA element.
submit
A form is submitted either via a button. This event only applies to the FORM element. Note that the HTMLFormElement.submit() method defined in does not fire this event type.
reset
A form is reset either via a button, or the HTMLFormElement.reset() method defined in . This event only applies to the FORM element.
resize
see resize in .
scroll
see scroll in .
focus
An element receives focus either via a pointing device, the focus() methods defined in , or by tabbing navigation. This event is only valid for the following elements: A, AREA, LABEL, INPUT, SELECT, TEXTAREA, and BUTTON. This event type is dispatched after the event type {"http://www.w3.org/2001/xml-events", "DOMFocusIn"}.
blur
An element loses focus either via a pointing device, the blur() methods defined in , or by tabbing navigation. This event is only valid for the following elements: A, AREA, LABEL, INPUT, SELECT, TEXTAREA, and BUTTON. This event type is dispatched after the event type {"http://www.w3.org/2001/xml-events", "DOMFocusOut"}.