Skip to content

Commit

Permalink
use .data instead of .textContent
Browse files Browse the repository at this point in the history
DOM is complex.
  • Loading branch information
iacore committed Jun 11, 2024
1 parent 439d0fe commit 16f8b80
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cjs/interface/document-fragment.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class DocumentFragment extends NonElementParentNode {
let {[NEXT]: next, [END]: end} = this;
while (next !== end) {
if (next.nodeType === TEXT_NODE)
text.push(next.textContent);
text.push(next.data);
next = next[NEXT];
}
return text.join('');
Expand Down
2 changes: 1 addition & 1 deletion esm/interface/document-fragment.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export class DocumentFragment extends NonElementParentNode {
let {[NEXT]: next, [END]: end} = this;
while (next !== end) {
if (next.nodeType === TEXT_NODE)
text.push(next.textContent);
text.push(next.data);
next = next[NEXT];
}
return text.join('');
Expand Down
2 changes: 1 addition & 1 deletion worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -7174,7 +7174,7 @@ let DocumentFragment$1 = class DocumentFragment extends NonElementParentNode {
let {[NEXT]: next, [END]: end} = this;
while (next !== end) {
if (next.nodeType === TEXT_NODE)
text.push(next.textContent);
text.push(next.data);
next = next[NEXT];
}
return text.join('');
Expand Down

0 comments on commit 16f8b80

Please sign in to comment.