Skip to content

Commit a7a267b

Browse files
authored
Merge pull request #1162 from mootookoi/patch-1
Update article.md
2 parents 3caa911 + c7df8e3 commit a7a267b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

2-ui/99-ui-misc/01-mutation-observer/article.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff 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
6969
mutationRecords = [{
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
8080
mutationRecords = [{
@@ -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
```

0 commit comments

Comments
 (0)