fix #14 fix innerText cap issue

This commit is contained in:
Yanzhen Yu
2019-08-04 14:40:54 +08:00
parent 61a99c642a
commit b22ccd6bc0

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);