DOM Events
From MDC
Following events can be captured by adding eventhandlers using addEventListener method of a DOM Element.
[edit] Specifications
DOM Level 3 Events (W3C Working Draft)
[edit] DOMSubtreeModified
This is a general event for notification of all changes to the document.
Specification: (W3C Draft)
[edit] DOMNodeInserted
Specification: W3C Draft
[edit] DOMNodeRemoved
Specification: W3C Draft
[edit] DOMNodeRemovedFromDocument
Specification: W3C Draft
[edit] DOMNodeInsertedIntoDocument
Specification: W3C Draft
[edit] DOMAttrModified
Specification: W3C Draft
[edit] DOMCharacterDataModified
Specification: W3C Draft
[edit] DOMElementNameChanged
Specification: W3C Draft
[edit] DOMAttributeNameChanged
Specification: W3C Draft
[edit] DOMActivate
Specification: W3C Draft
[edit] DOMFocusIn
Specification: W3C Draft
[edit] DOMFocusOut
Specification: W3C Draft
[edit] online
New in Firefox 3 Can used on window, document, or document.body, see Online_and_offline_events.
Specification: WHATWG HTML 5 DRAFT
[edit] offline
New in Firefox 3 Can used on window, document, or document.body, see Online_and_offline_events.
Specification: WHATWG HTML 5 DRAFT
[edit] textInput
This is same as onkeypress.
Specification: W3C Draft
[edit] Example
Following code will display the time of last DOM Change on the title bar of the page.
document.addEventListener("DOMSubtreeModified", function(){document.title="DOM Changed at " + new Date()}, false);