-
-
Notifications
You must be signed in to change notification settings - Fork 219
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
svg element innertText is undefined #1151
Labels
bug
Something isn't working
Comments
karpiuMG
added a commit
to karpiuMG/happy-dom
that referenced
this issue
Feb 28, 2025
karpiuMG
added a commit
to karpiuMG/happy-dom
that referenced
this issue
Feb 28, 2025
…there's more content coming after
capricorn86
added a commit
to karpiuMG/happy-dom
that referenced
this issue
Mar 6, 2025
capricorn86
added a commit
that referenced
this issue
Mar 6, 2025
* fix: [#1151] Skips svg elements when innerText is used * fix: [#1151] Add newline if it's a block/flex element and there's more content coming after * chore: [#1151] Improves performance and removes incorrect comment --------- Co-authored-by: David Ortner <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
svg element innertText is undefined, it should be a string.
To Reproduce
actual log:
undefined123
Expected behavior
expected log:
123
Device:
Additional context
in https://github.com/capricorn86/happy-dom/blob/master/packages/happy-dom/src/nodes/html-element/HTMLElement.ts#L101, I think the judgment here should be whether it's HTMLElement or not, only htmlelement has innerText
The text was updated successfully, but these errors were encountered: