DOM Events
出典: MDC
以下のイベントは、DOM Element の addEventListener メソッドを使用してイベントハンドラを追加することにより、捕捉することができます。
[編集] 仕様書
DOM Level 3 Events (W3C Working Draft)
[編集] DOMSubtreeModified
これは、document のすべての変更を知らせる一般的なイベントです。
仕様: (W3C Draft)
[編集] DOMNodeInserted
仕様: W3C Draft
[編集] DOMNodeRemoved
仕様: W3C Draft
[編集] DOMNodeRemovedFromDocument
仕様: W3C Draft
[編集] DOMNodeInsertedIntoDocument
仕様: W3C Draft
[編集] DOMAttrModified
仕様: W3C Draft
[編集] DOMCharacterDataModified
仕様: W3C Draft
[編集] DOMElementNameChanged
仕様: W3C Draft
[編集] DOMAttributeNameChanged
仕様: W3C Draft
[編集] DOMActivate
仕様: W3C Draft
[編集] DOMFocusIn
仕様: W3C Draft
[編集] DOMFocusOut
仕様: W3C Draft
[編集] online
Firefox 3 の新機能 window または document, document.body 上で使用できます。Online_and_offline_events を参照してください。
[編集] offline
Firefox 3 の新機能 window または document, document.body 上で使用できます。Online_and_offline_events を参照してください。
[編集] textInput
これは onkeypress と同じです。
仕様: W3C Draft
[編集] 例
次のコードは、最後の DOM 変更が行われた日時をページのタイトルバーに表示します。
document.addEventListener("DOMSubtreeModified", function(){document.title="DOM Changed at " + new Date()}, false);