fix #14 fix innerText cap issue

This commit is contained in:
Yanzhen Yu
2026-04-01 12:00:00 +08:00
parent 21e8affa2b
commit 6457f9ff62

View File

@@ -158,7 +158,11 @@ function serializeNode(
tagName === 'style' &&
(n as HTMLStyleElement).sheet &&
// TODO: Currently we only try to get dynamic stylesheet when it is an empty style element
!(n as HTMLElement).innerText.trim().length
!(
(n as HTMLElement).innerText ||
(n as HTMLElement).textContent ||
''
).trim().length
) {
const cssText = getCssRulesString((n as HTMLStyleElement)
.sheet as CSSStyleSheet);