Skip to content

Suggest using textContent instead of innerHTML #138

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

Merged
merged 4 commits into from
Sep 14, 2021

Conversation

manuelpuyol
Copy link
Contributor

We were suggesting using innerHTML to clear content, but that's the same as textContent = ''.
This PR will block all uses of innerHTML and autocorrect to use textContent instead

@manuelpuyol manuelpuyol requested a review from a team as a code owner September 10, 2021 19:25
Copy link
Contributor

@dgreif dgreif left a comment

Choose a reason for hiding this comment

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

Nice, I like the change!

Copy link

@JoseInTheArena JoseInTheArena left a comment

Choose a reason for hiding this comment

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

Thanks for putting this together! 🙇🏻‍♂️ I just have a small question about the copy on the docs.

@manuelpuyol
Copy link
Contributor Author

per @koddsson request, I removed autocorrection since it was confusing

@manuelpuyol manuelpuyol merged commit e6bf709 into main Sep 14, 2021
@manuelpuyol manuelpuyol deleted the suggest-textContent-instead-of-innerHTML branch September 14, 2021 14:15
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.

4 participants