Skip to content
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

fix: Text.textContent setter #174

Merged
merged 3 commits into from
Aug 12, 2024

Conversation

timreichen
Copy link
Contributor

One should be able to set Text.textContent.

src/dom/node.ts Outdated
@@ -635,6 +635,9 @@ export class Text extends CharacterData {
get textContent(): string {
return <string> this.nodeValue;
}
set textContent(value) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR. Can you put a line space between the two blocks and add a test?

Copy link
Contributor Author

@timreichen timreichen Aug 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, since Text extends CharacterData->Node and Node already implements getter/setter for textContent: Are you fine with removing both of them from Text?

@b-fuze
Copy link
Owner

b-fuze commented Aug 12, 2024

LGTM

@b-fuze b-fuze merged commit 4658549 into b-fuze:master Aug 12, 2024
2 checks passed
@timreichen timreichen deleted the text-textContent-setter branch August 12, 2024 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants