What is the sequence of events in which nodes in the DOM change?












1















TL;DR:



Entering a carriage return between two characters and thus causing a new LI node to be automatically generated, what events occurred in the DOM during this entire process, and what is the order?



Is my inference below correct? Of course, you can also directly elucidate yours without having to look at a lot of my words, thank you very much!







I saw a demo when I reading and learning Mutation Observer at MDN and simplified it as follows:



const MutationObserver = window.MutationObserver

const list = document.querySelector(`ol`);

const config = {
characterData: true,
childList: true,
subtree: true,
}

const observer = new MutationObserver(mutations =>
console.log(mutations)
)
observer.observe(list, config)





<!DOCTYPE html>

<head>
<meta charset="UTF-8">
<title>Mutation Observer & customize resize event listener & demo</title>
<style>
ol {
box-sizing: border-box;
max-width: 20rem;
border: 1px solid crimson;
resize: both;
}
</style>
</head>

<body>
<section>
<h1>Mutation Observer & customize resize event listener & demo</h1>
<strong>Please open the console of your own browser.</strong> (Because if using the too simple console in the Code Snippet on Stack Overflow, then your browser will be hanged for a few seconds when you inputting characters, since it is going to dump and display massive amounts of data.)
</section>
<section>
<ol contenteditable>
<li>a</li>
</ol>
</section>

<script>
const MutationObserver = window.MutationObserver

const list = document.querySelector(`ol`);
// options
const config = {
characterData: true,
childList: true,
subtree: true,
}
// instance
const observer = new MutationObserver(mutations =>
console.log(mutations)
)
observer.observe(list, config)
</script>
</body>

</html>





I did two operations (which will be mentioned below) on this adapted demo and observed the console, but I am not quite sure about the specific events (what happen and what is the sequence?) in each MutationRecord, only to speculate in reverse what they are (also be mentioned below).



The two operations and the text before and after each operation are:



Operation 0

1. Enter a character "b" after the character "a";
Operation 1

2. Enter a carriage return between the characters "a" and "b".
Operation 2



And all the output in the console:
console





The following is my speculation about event procedures for each MutationRecord, with symbol annotations.



The detailed version






<pre style="white-space: pre-wrap">
// line 1: "a"

// [Operation 1] Enter a character "b" after the character "a":

// [Console output]
[MutationRecord]

0: MutationRecord {type: "characterData", target: text, …}
// OL > LI#1 > #text"a"(+)"b"
// list at line 1 added a character "b".


// line 1: "ab"

// [Operation 2] Enter a carriage return `↵` between the characters "a" and "b":

// [Console output]
Array(5) [MutationRecord, MutationRecord, MutationRecord, MutationRecord, MutationRecord]

0: MutationRecord {type: "childList", target: li, addedNodes: NodeList(1), removedNodes: NodeList(0), previousSibling: null, nextSibling: text, …}
// OL > LI#1 > (-+)#text"a"
// `↵` causes the text node containing the character "a" be split off from the li node transiently and then be prepended back to its original resident li node immediately.

1: MutationRecord {type: "characterData", target: text, addedNodes: NodeList(0), removedNodes: NodeList(0), previousSibling: null, nextSibling: null, …}
// OL > LI#1 > #text(-+)"b"
// `↵` causes the character "b" be split off from its owner text node transiently and then be prepended back to its original resident text node immediately.

2: MutationRecord {type: "childList", target: ol, addedNodes: NodeList(1), removedNodes: NodeList(0), previousSibling: li, nextSibling: text, …}
// OL > (+)LI#2
// A new li node appears (for holding the text node which contains the character "b" at soon) and is appended to the end inside the ol node.

3: MutationRecord {type: "childList", target: li, addedNodes: NodeList(0), removedNodes: NodeList(1), previousSibling: text, …}
// OL > LI#1 > (-)#text"b"
// The last child of the first li node is moved out — the text node containing the character "b" is detached from the first li node.

4: MutationRecord {type: "childList", target: li, addedNodes: NodeList(1), removedNodes: NodeList(0), previousSibling: null, …}
// OL > LI#2 > (+)#text"b"
// The text node containing the character "b" is appended to the second li node.


// line 1: "a"
// line 2: "b"
</pre>





The brief version



// line 1: "a"

// Enter a character "b" after the character "a".
// The mutation is equivalent to:

OL > LI#1 > #text"a"(+)"b"


// line 1: "ab"

// Enter a carriage return `↵` between the characters "a" and "b".
// The mutations are equivalent to:

OL > LI#1 > (-+)#text "a"
OL > LI#1 > #text(-+)"b"
OL > (+)LI#2
OL > LI#1 > (-)#text "b"
OL > LI#2 > (+)#text "b"


// line 1: "a"
// line 2: "b"









share|improve this question




















  • 1





    Seems correct, but I wouldn't rely on this sequence as it may be implementation-specific and subject to change without notice - if it's not described in some DOM specification. BTW characterDataOldValue: true in the options could be helpful for such investigations.

    – wOxxOm
    Jan 2 at 7:22


















1















TL;DR:



Entering a carriage return between two characters and thus causing a new LI node to be automatically generated, what events occurred in the DOM during this entire process, and what is the order?



Is my inference below correct? Of course, you can also directly elucidate yours without having to look at a lot of my words, thank you very much!







I saw a demo when I reading and learning Mutation Observer at MDN and simplified it as follows:



const MutationObserver = window.MutationObserver

const list = document.querySelector(`ol`);

const config = {
characterData: true,
childList: true,
subtree: true,
}

const observer = new MutationObserver(mutations =>
console.log(mutations)
)
observer.observe(list, config)





<!DOCTYPE html>

<head>
<meta charset="UTF-8">
<title>Mutation Observer & customize resize event listener & demo</title>
<style>
ol {
box-sizing: border-box;
max-width: 20rem;
border: 1px solid crimson;
resize: both;
}
</style>
</head>

<body>
<section>
<h1>Mutation Observer & customize resize event listener & demo</h1>
<strong>Please open the console of your own browser.</strong> (Because if using the too simple console in the Code Snippet on Stack Overflow, then your browser will be hanged for a few seconds when you inputting characters, since it is going to dump and display massive amounts of data.)
</section>
<section>
<ol contenteditable>
<li>a</li>
</ol>
</section>

<script>
const MutationObserver = window.MutationObserver

const list = document.querySelector(`ol`);
// options
const config = {
characterData: true,
childList: true,
subtree: true,
}
// instance
const observer = new MutationObserver(mutations =>
console.log(mutations)
)
observer.observe(list, config)
</script>
</body>

</html>





I did two operations (which will be mentioned below) on this adapted demo and observed the console, but I am not quite sure about the specific events (what happen and what is the sequence?) in each MutationRecord, only to speculate in reverse what they are (also be mentioned below).



The two operations and the text before and after each operation are:



Operation 0

1. Enter a character "b" after the character "a";
Operation 1

2. Enter a carriage return between the characters "a" and "b".
Operation 2



And all the output in the console:
console





The following is my speculation about event procedures for each MutationRecord, with symbol annotations.



The detailed version






<pre style="white-space: pre-wrap">
// line 1: "a"

// [Operation 1] Enter a character "b" after the character "a":

// [Console output]
[MutationRecord]

0: MutationRecord {type: "characterData", target: text, …}
// OL > LI#1 > #text"a"(+)"b"
// list at line 1 added a character "b".


// line 1: "ab"

// [Operation 2] Enter a carriage return `↵` between the characters "a" and "b":

// [Console output]
Array(5) [MutationRecord, MutationRecord, MutationRecord, MutationRecord, MutationRecord]

0: MutationRecord {type: "childList", target: li, addedNodes: NodeList(1), removedNodes: NodeList(0), previousSibling: null, nextSibling: text, …}
// OL > LI#1 > (-+)#text"a"
// `↵` causes the text node containing the character "a" be split off from the li node transiently and then be prepended back to its original resident li node immediately.

1: MutationRecord {type: "characterData", target: text, addedNodes: NodeList(0), removedNodes: NodeList(0), previousSibling: null, nextSibling: null, …}
// OL > LI#1 > #text(-+)"b"
// `↵` causes the character "b" be split off from its owner text node transiently and then be prepended back to its original resident text node immediately.

2: MutationRecord {type: "childList", target: ol, addedNodes: NodeList(1), removedNodes: NodeList(0), previousSibling: li, nextSibling: text, …}
// OL > (+)LI#2
// A new li node appears (for holding the text node which contains the character "b" at soon) and is appended to the end inside the ol node.

3: MutationRecord {type: "childList", target: li, addedNodes: NodeList(0), removedNodes: NodeList(1), previousSibling: text, …}
// OL > LI#1 > (-)#text"b"
// The last child of the first li node is moved out — the text node containing the character "b" is detached from the first li node.

4: MutationRecord {type: "childList", target: li, addedNodes: NodeList(1), removedNodes: NodeList(0), previousSibling: null, …}
// OL > LI#2 > (+)#text"b"
// The text node containing the character "b" is appended to the second li node.


// line 1: "a"
// line 2: "b"
</pre>





The brief version



// line 1: "a"

// Enter a character "b" after the character "a".
// The mutation is equivalent to:

OL > LI#1 > #text"a"(+)"b"


// line 1: "ab"

// Enter a carriage return `↵` between the characters "a" and "b".
// The mutations are equivalent to:

OL > LI#1 > (-+)#text "a"
OL > LI#1 > #text(-+)"b"
OL > (+)LI#2
OL > LI#1 > (-)#text "b"
OL > LI#2 > (+)#text "b"


// line 1: "a"
// line 2: "b"









share|improve this question




















  • 1





    Seems correct, but I wouldn't rely on this sequence as it may be implementation-specific and subject to change without notice - if it's not described in some DOM specification. BTW characterDataOldValue: true in the options could be helpful for such investigations.

    – wOxxOm
    Jan 2 at 7:22
















1












1








1


1






TL;DR:



Entering a carriage return between two characters and thus causing a new LI node to be automatically generated, what events occurred in the DOM during this entire process, and what is the order?



Is my inference below correct? Of course, you can also directly elucidate yours without having to look at a lot of my words, thank you very much!







I saw a demo when I reading and learning Mutation Observer at MDN and simplified it as follows:



const MutationObserver = window.MutationObserver

const list = document.querySelector(`ol`);

const config = {
characterData: true,
childList: true,
subtree: true,
}

const observer = new MutationObserver(mutations =>
console.log(mutations)
)
observer.observe(list, config)





<!DOCTYPE html>

<head>
<meta charset="UTF-8">
<title>Mutation Observer & customize resize event listener & demo</title>
<style>
ol {
box-sizing: border-box;
max-width: 20rem;
border: 1px solid crimson;
resize: both;
}
</style>
</head>

<body>
<section>
<h1>Mutation Observer & customize resize event listener & demo</h1>
<strong>Please open the console of your own browser.</strong> (Because if using the too simple console in the Code Snippet on Stack Overflow, then your browser will be hanged for a few seconds when you inputting characters, since it is going to dump and display massive amounts of data.)
</section>
<section>
<ol contenteditable>
<li>a</li>
</ol>
</section>

<script>
const MutationObserver = window.MutationObserver

const list = document.querySelector(`ol`);
// options
const config = {
characterData: true,
childList: true,
subtree: true,
}
// instance
const observer = new MutationObserver(mutations =>
console.log(mutations)
)
observer.observe(list, config)
</script>
</body>

</html>





I did two operations (which will be mentioned below) on this adapted demo and observed the console, but I am not quite sure about the specific events (what happen and what is the sequence?) in each MutationRecord, only to speculate in reverse what they are (also be mentioned below).



The two operations and the text before and after each operation are:



Operation 0

1. Enter a character "b" after the character "a";
Operation 1

2. Enter a carriage return between the characters "a" and "b".
Operation 2



And all the output in the console:
console





The following is my speculation about event procedures for each MutationRecord, with symbol annotations.



The detailed version






<pre style="white-space: pre-wrap">
// line 1: "a"

// [Operation 1] Enter a character "b" after the character "a":

// [Console output]
[MutationRecord]

0: MutationRecord {type: "characterData", target: text, …}
// OL > LI#1 > #text"a"(+)"b"
// list at line 1 added a character "b".


// line 1: "ab"

// [Operation 2] Enter a carriage return `↵` between the characters "a" and "b":

// [Console output]
Array(5) [MutationRecord, MutationRecord, MutationRecord, MutationRecord, MutationRecord]

0: MutationRecord {type: "childList", target: li, addedNodes: NodeList(1), removedNodes: NodeList(0), previousSibling: null, nextSibling: text, …}
// OL > LI#1 > (-+)#text"a"
// `↵` causes the text node containing the character "a" be split off from the li node transiently and then be prepended back to its original resident li node immediately.

1: MutationRecord {type: "characterData", target: text, addedNodes: NodeList(0), removedNodes: NodeList(0), previousSibling: null, nextSibling: null, …}
// OL > LI#1 > #text(-+)"b"
// `↵` causes the character "b" be split off from its owner text node transiently and then be prepended back to its original resident text node immediately.

2: MutationRecord {type: "childList", target: ol, addedNodes: NodeList(1), removedNodes: NodeList(0), previousSibling: li, nextSibling: text, …}
// OL > (+)LI#2
// A new li node appears (for holding the text node which contains the character "b" at soon) and is appended to the end inside the ol node.

3: MutationRecord {type: "childList", target: li, addedNodes: NodeList(0), removedNodes: NodeList(1), previousSibling: text, …}
// OL > LI#1 > (-)#text"b"
// The last child of the first li node is moved out — the text node containing the character "b" is detached from the first li node.

4: MutationRecord {type: "childList", target: li, addedNodes: NodeList(1), removedNodes: NodeList(0), previousSibling: null, …}
// OL > LI#2 > (+)#text"b"
// The text node containing the character "b" is appended to the second li node.


// line 1: "a"
// line 2: "b"
</pre>





The brief version



// line 1: "a"

// Enter a character "b" after the character "a".
// The mutation is equivalent to:

OL > LI#1 > #text"a"(+)"b"


// line 1: "ab"

// Enter a carriage return `↵` between the characters "a" and "b".
// The mutations are equivalent to:

OL > LI#1 > (-+)#text "a"
OL > LI#1 > #text(-+)"b"
OL > (+)LI#2
OL > LI#1 > (-)#text "b"
OL > LI#2 > (+)#text "b"


// line 1: "a"
// line 2: "b"









share|improve this question
















TL;DR:



Entering a carriage return between two characters and thus causing a new LI node to be automatically generated, what events occurred in the DOM during this entire process, and what is the order?



Is my inference below correct? Of course, you can also directly elucidate yours without having to look at a lot of my words, thank you very much!







I saw a demo when I reading and learning Mutation Observer at MDN and simplified it as follows:



const MutationObserver = window.MutationObserver

const list = document.querySelector(`ol`);

const config = {
characterData: true,
childList: true,
subtree: true,
}

const observer = new MutationObserver(mutations =>
console.log(mutations)
)
observer.observe(list, config)





<!DOCTYPE html>

<head>
<meta charset="UTF-8">
<title>Mutation Observer & customize resize event listener & demo</title>
<style>
ol {
box-sizing: border-box;
max-width: 20rem;
border: 1px solid crimson;
resize: both;
}
</style>
</head>

<body>
<section>
<h1>Mutation Observer & customize resize event listener & demo</h1>
<strong>Please open the console of your own browser.</strong> (Because if using the too simple console in the Code Snippet on Stack Overflow, then your browser will be hanged for a few seconds when you inputting characters, since it is going to dump and display massive amounts of data.)
</section>
<section>
<ol contenteditable>
<li>a</li>
</ol>
</section>

<script>
const MutationObserver = window.MutationObserver

const list = document.querySelector(`ol`);
// options
const config = {
characterData: true,
childList: true,
subtree: true,
}
// instance
const observer = new MutationObserver(mutations =>
console.log(mutations)
)
observer.observe(list, config)
</script>
</body>

</html>





I did two operations (which will be mentioned below) on this adapted demo and observed the console, but I am not quite sure about the specific events (what happen and what is the sequence?) in each MutationRecord, only to speculate in reverse what they are (also be mentioned below).



The two operations and the text before and after each operation are:



Operation 0

1. Enter a character "b" after the character "a";
Operation 1

2. Enter a carriage return between the characters "a" and "b".
Operation 2



And all the output in the console:
console





The following is my speculation about event procedures for each MutationRecord, with symbol annotations.



The detailed version






<pre style="white-space: pre-wrap">
// line 1: "a"

// [Operation 1] Enter a character "b" after the character "a":

// [Console output]
[MutationRecord]

0: MutationRecord {type: "characterData", target: text, …}
// OL > LI#1 > #text"a"(+)"b"
// list at line 1 added a character "b".


// line 1: "ab"

// [Operation 2] Enter a carriage return `↵` between the characters "a" and "b":

// [Console output]
Array(5) [MutationRecord, MutationRecord, MutationRecord, MutationRecord, MutationRecord]

0: MutationRecord {type: "childList", target: li, addedNodes: NodeList(1), removedNodes: NodeList(0), previousSibling: null, nextSibling: text, …}
// OL > LI#1 > (-+)#text"a"
// `↵` causes the text node containing the character "a" be split off from the li node transiently and then be prepended back to its original resident li node immediately.

1: MutationRecord {type: "characterData", target: text, addedNodes: NodeList(0), removedNodes: NodeList(0), previousSibling: null, nextSibling: null, …}
// OL > LI#1 > #text(-+)"b"
// `↵` causes the character "b" be split off from its owner text node transiently and then be prepended back to its original resident text node immediately.

2: MutationRecord {type: "childList", target: ol, addedNodes: NodeList(1), removedNodes: NodeList(0), previousSibling: li, nextSibling: text, …}
// OL > (+)LI#2
// A new li node appears (for holding the text node which contains the character "b" at soon) and is appended to the end inside the ol node.

3: MutationRecord {type: "childList", target: li, addedNodes: NodeList(0), removedNodes: NodeList(1), previousSibling: text, …}
// OL > LI#1 > (-)#text"b"
// The last child of the first li node is moved out — the text node containing the character "b" is detached from the first li node.

4: MutationRecord {type: "childList", target: li, addedNodes: NodeList(1), removedNodes: NodeList(0), previousSibling: null, …}
// OL > LI#2 > (+)#text"b"
// The text node containing the character "b" is appended to the second li node.


// line 1: "a"
// line 2: "b"
</pre>





The brief version



// line 1: "a"

// Enter a character "b" after the character "a".
// The mutation is equivalent to:

OL > LI#1 > #text"a"(+)"b"


// line 1: "ab"

// Enter a carriage return `↵` between the characters "a" and "b".
// The mutations are equivalent to:

OL > LI#1 > (-+)#text "a"
OL > LI#1 > #text(-+)"b"
OL > (+)LI#2
OL > LI#1 > (-)#text "b"
OL > LI#2 > (+)#text "b"


// line 1: "a"
// line 2: "b"





<!DOCTYPE html>

<head>
<meta charset="UTF-8">
<title>Mutation Observer & customize resize event listener & demo</title>
<style>
ol {
box-sizing: border-box;
max-width: 20rem;
border: 1px solid crimson;
resize: both;
}
</style>
</head>

<body>
<section>
<h1>Mutation Observer & customize resize event listener & demo</h1>
<strong>Please open the console of your own browser.</strong> (Because if using the too simple console in the Code Snippet on Stack Overflow, then your browser will be hanged for a few seconds when you inputting characters, since it is going to dump and display massive amounts of data.)
</section>
<section>
<ol contenteditable>
<li>a</li>
</ol>
</section>

<script>
const MutationObserver = window.MutationObserver

const list = document.querySelector(`ol`);
// options
const config = {
characterData: true,
childList: true,
subtree: true,
}
// instance
const observer = new MutationObserver(mutations =>
console.log(mutations)
)
observer.observe(list, config)
</script>
</body>

</html>





<!DOCTYPE html>

<head>
<meta charset="UTF-8">
<title>Mutation Observer & customize resize event listener & demo</title>
<style>
ol {
box-sizing: border-box;
max-width: 20rem;
border: 1px solid crimson;
resize: both;
}
</style>
</head>

<body>
<section>
<h1>Mutation Observer & customize resize event listener & demo</h1>
<strong>Please open the console of your own browser.</strong> (Because if using the too simple console in the Code Snippet on Stack Overflow, then your browser will be hanged for a few seconds when you inputting characters, since it is going to dump and display massive amounts of data.)
</section>
<section>
<ol contenteditable>
<li>a</li>
</ol>
</section>

<script>
const MutationObserver = window.MutationObserver

const list = document.querySelector(`ol`);
// options
const config = {
characterData: true,
childList: true,
subtree: true,
}
// instance
const observer = new MutationObserver(mutations =>
console.log(mutations)
)
observer.observe(list, config)
</script>
</body>

</html>





<pre style="white-space: pre-wrap">
// line 1: "a"

// [Operation 1] Enter a character "b" after the character "a":

// [Console output]
[MutationRecord]

0: MutationRecord {type: "characterData", target: text, …}
// OL > LI#1 > #text"a"(+)"b"
// list at line 1 added a character "b".


// line 1: "ab"

// [Operation 2] Enter a carriage return `↵` between the characters "a" and "b":

// [Console output]
Array(5) [MutationRecord, MutationRecord, MutationRecord, MutationRecord, MutationRecord]

0: MutationRecord {type: "childList", target: li, addedNodes: NodeList(1), removedNodes: NodeList(0), previousSibling: null, nextSibling: text, …}
// OL > LI#1 > (-+)#text"a"
// `↵` causes the text node containing the character "a" be split off from the li node transiently and then be prepended back to its original resident li node immediately.

1: MutationRecord {type: "characterData", target: text, addedNodes: NodeList(0), removedNodes: NodeList(0), previousSibling: null, nextSibling: null, …}
// OL > LI#1 > #text(-+)"b"
// `↵` causes the character "b" be split off from its owner text node transiently and then be prepended back to its original resident text node immediately.

2: MutationRecord {type: "childList", target: ol, addedNodes: NodeList(1), removedNodes: NodeList(0), previousSibling: li, nextSibling: text, …}
// OL > (+)LI#2
// A new li node appears (for holding the text node which contains the character "b" at soon) and is appended to the end inside the ol node.

3: MutationRecord {type: "childList", target: li, addedNodes: NodeList(0), removedNodes: NodeList(1), previousSibling: text, …}
// OL > LI#1 > (-)#text"b"
// The last child of the first li node is moved out — the text node containing the character "b" is detached from the first li node.

4: MutationRecord {type: "childList", target: li, addedNodes: NodeList(1), removedNodes: NodeList(0), previousSibling: null, …}
// OL > LI#2 > (+)#text"b"
// The text node containing the character "b" is appended to the second li node.


// line 1: "a"
// line 2: "b"
</pre>





<pre style="white-space: pre-wrap">
// line 1: "a"

// [Operation 1] Enter a character "b" after the character "a":

// [Console output]
[MutationRecord]

0: MutationRecord {type: "characterData", target: text, …}
// OL > LI#1 > #text"a"(+)"b"
// list at line 1 added a character "b".


// line 1: "ab"

// [Operation 2] Enter a carriage return `↵` between the characters "a" and "b":

// [Console output]
Array(5) [MutationRecord, MutationRecord, MutationRecord, MutationRecord, MutationRecord]

0: MutationRecord {type: "childList", target: li, addedNodes: NodeList(1), removedNodes: NodeList(0), previousSibling: null, nextSibling: text, …}
// OL > LI#1 > (-+)#text"a"
// `↵` causes the text node containing the character "a" be split off from the li node transiently and then be prepended back to its original resident li node immediately.

1: MutationRecord {type: "characterData", target: text, addedNodes: NodeList(0), removedNodes: NodeList(0), previousSibling: null, nextSibling: null, …}
// OL > LI#1 > #text(-+)"b"
// `↵` causes the character "b" be split off from its owner text node transiently and then be prepended back to its original resident text node immediately.

2: MutationRecord {type: "childList", target: ol, addedNodes: NodeList(1), removedNodes: NodeList(0), previousSibling: li, nextSibling: text, …}
// OL > (+)LI#2
// A new li node appears (for holding the text node which contains the character "b" at soon) and is appended to the end inside the ol node.

3: MutationRecord {type: "childList", target: li, addedNodes: NodeList(0), removedNodes: NodeList(1), previousSibling: text, …}
// OL > LI#1 > (-)#text"b"
// The last child of the first li node is moved out — the text node containing the character "b" is detached from the first li node.

4: MutationRecord {type: "childList", target: li, addedNodes: NodeList(1), removedNodes: NodeList(0), previousSibling: null, …}
// OL > LI#2 > (+)#text"b"
// The text node containing the character "b" is appended to the second li node.


// line 1: "a"
// line 2: "b"
</pre>






javascript dom mutation-observers






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 2 at 7:15







ooo

















asked Jan 2 at 6:44









oooooo

1226




1226








  • 1





    Seems correct, but I wouldn't rely on this sequence as it may be implementation-specific and subject to change without notice - if it's not described in some DOM specification. BTW characterDataOldValue: true in the options could be helpful for such investigations.

    – wOxxOm
    Jan 2 at 7:22
















  • 1





    Seems correct, but I wouldn't rely on this sequence as it may be implementation-specific and subject to change without notice - if it's not described in some DOM specification. BTW characterDataOldValue: true in the options could be helpful for such investigations.

    – wOxxOm
    Jan 2 at 7:22










1




1





Seems correct, but I wouldn't rely on this sequence as it may be implementation-specific and subject to change without notice - if it's not described in some DOM specification. BTW characterDataOldValue: true in the options could be helpful for such investigations.

– wOxxOm
Jan 2 at 7:22







Seems correct, but I wouldn't rely on this sequence as it may be implementation-specific and subject to change without notice - if it's not described in some DOM specification. BTW characterDataOldValue: true in the options could be helpful for such investigations.

– wOxxOm
Jan 2 at 7:22














0






active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54002287%2fwhat-is-the-sequence-of-events-in-which-nodes-in-the-dom-change%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54002287%2fwhat-is-the-sequence-of-events-in-which-nodes-in-the-dom-change%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

MongoDB - Not Authorized To Execute Command

How to fix TextFormField cause rebuild widget in Flutter

Npm cannot find a required file even through it is in the searched directory