From 16f8b801ccdaa15a2a839549c08563d1e1cc0941 Mon Sep 17 00:00:00 2001 From: iacore Date: Tue, 11 Jun 2024 15:50:28 +0000 Subject: [PATCH] use .data instead of .textContent DOM is complex. --- cjs/interface/document-fragment.js | 2 +- esm/interface/document-fragment.js | 2 +- worker.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cjs/interface/document-fragment.js b/cjs/interface/document-fragment.js index 7aab7e6..09d9f96 100644 --- a/cjs/interface/document-fragment.js +++ b/cjs/interface/document-fragment.js @@ -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(''); diff --git a/esm/interface/document-fragment.js b/esm/interface/document-fragment.js index 48092a9..bed4ed0 100644 --- a/esm/interface/document-fragment.js +++ b/esm/interface/document-fragment.js @@ -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(''); diff --git a/worker.js b/worker.js index 53ca5d1..ad1e758 100644 --- a/worker.js +++ b/worker.js @@ -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('');