summaryrefslogtreecommitdiff
path: root/libdom/the_mutationevent_generation.mdwn
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@digital-scurf.org>2017-02-04 09:41:13 +0000
committerDaniel Silverstone <dsilvers@digital-scurf.org>2017-02-04 09:41:13 +0000
commite7366bf41f68cfe07e9ea03fc4a398baecbae651 (patch)
tree5bb9c3cbe7eab7e70ff1ebd65d9de59a694762df /libdom/the_mutationevent_generation.mdwn
downloadnetsurf-wiki-e7366bf41f68cfe07e9ea03fc4a398baecbae651.tar.gz
netsurf-wiki-e7366bf41f68cfe07e9ea03fc4a398baecbae651.tar.bz2
Initial conversion from MediaWiki, 20170204
Diffstat (limited to 'libdom/the_mutationevent_generation.mdwn')
-rw-r--r--libdom/the_mutationevent_generation.mdwn96
1 files changed, 96 insertions, 0 deletions
diff --git a/libdom/the_mutationevent_generation.mdwn b/libdom/the_mutationevent_generation.mdwn
new file mode 100644
index 0000000..ae00db3
--- /dev/null
+++ b/libdom/the_mutationevent_generation.mdwn
@@ -0,0 +1,96 @@
+[[!meta title="LibDOM/The MutationEvent generation"]]
+[[!meta author="Struggleyb"]]
+[[!meta date="2009-08-09T10:20:48Z"]]
+
+
+[[!toc]]
+
+Events with Methods Generate them
+---------------------------------
+
+
+ DOMSubtreeModified:
+
+
+ DOMNodeRemovedFromDocument:
+ Node.replaceChild
+ Node.removeChild
+ Element.removeAttribute
+ Element.setAttributeNode
+ Element.removeAttributeNode
+ Element.removeAttributeNS
+ Element.setAttributeNodeNS
+
+ DOMNodeInsertedIntoDocument:
+ Node.insertBefore
+ Node.replaceChild
+ Node.appendChild
+ Element.setAttribute
+ Element.setAttributeNode
+ Element.setAttributeNS
+ Element.setAttributeNodeNS
+
+ DOMNodeInserted:
+ Node.insertBefore
+ Node.replaceChild
+ Node.appendChild
+ Element.setAttribute
+ Element.setAttributeNode
+ Element.setAttributeNS
+ Element.setAttributeNodeNS
+
+ DOMNodeRemoved:
+ Node.replaceChild
+ Node.removeChild
+ Element.removeAttribute
+ Element.setAttributeNode
+ Element.removeAttributeNode
+ Element.removeAttributeNS
+ Element.setAttributeNodeNS
+
+ DOMAttrModified:
+ Element.setAttribute
+ Element.removeAttribute
+ Element.setAttributeNode
+ Element.removeAttributeNode
+ Element.setAttributeNS
+ Element.removeAttributeNS
+ Element.setAttributeNodeNS
+
+ DOMCharacterDataModified:
+ Node.nodeValue
+ CharacterData.data
+ CharacterData.appendData
+ CharacterData.deleteData
+ CharacterData.insertData
+ CharacterData.replaceData
+ ProcessingInstruction.data
+
+#### Some Event Generation Order consideration
+
+As above, some changes of DOM caused by certain API can emit multiple
+Events. In some situation, the DOM spec define the order of the events.
+For example, when an Attr is removed from an element, the implementation
+should send the following events as the following order:
+
+ DOMNodeRemoved
+ DOMAttrModified
+ DOMSubtreeModified
+
+But in other situation, the events order are not specified. For example,
+when an Attr is added to an element, the implement should may send:
+
+ DOMNodeInserted
+ DOMAttrModified
+ DOMSubtreeModified
+
+or
+
+ DOMAttrModified
+ DOMNodeInserted
+ DOMSubtreeModified
+
+The point here is, the DOMAttrModified and DOMNodeInserted can be
+dispatched in any order, but the DOMSubtreeModified event should always
+the last event after bunch of events.
+