File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
2-ui/99-ui-misc/01-mutation-observer Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -63,18 +63,18 @@ observer.observe(elem, {
6363 </script >
6464```
6565
66- If we change the text inside ` <b>me </b> ` , we'll get a single mutation:
66+ If we change the text inside ` <b>edit </b> ` , we'll get a single mutation:
6767
6868``` js
6969mutationRecords = [{
7070 type: " characterData" ,
71- oldValue: " me " ,
71+ oldValue: " edit " ,
7272 target: < text node> ,
7373 // other properties empty
7474}];
7575```
7676
77- If we select and remove the ` <b>me </b> ` altogether, we'll get multiple mutations:
77+ If we select and remove the ` <b>edit </b> ` altogether, we'll get multiple mutations:
7878
7979``` js
8080mutationRecords = [{
@@ -88,8 +88,8 @@ mutationRecords = [{
8888 type: " characterData"
8989 target: < text node>
9090 // ...details depend on how the browser handles the change
91- // it may coalesce two adjacent text nodes "Edit " and ", please" into one node
92- // or it can just delete the extra space after "Edit ".
91+ // it may coalesce two adjacent text nodes "edit " and ", please" into one node
92+ // or it can just delete the extra space after "edit ".
9393 // may be one mutation or a few
9494}];
9595```
You can’t perform that action at this time.
0 commit comments