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

Disallow setting innerHTML inside the constructor #55

Open
stramel opened this issue May 10, 2021 · 0 comments
Open

Disallow setting innerHTML inside the constructor #55

stramel opened this issue May 10, 2021 · 0 comments
Labels
help wanted Extra attention is needed new lint rule New lint rule request

Comments

@stramel
Copy link
Collaborator

stramel commented May 10, 2021

As @bennypowers points out in his tweet, https://twitter.com/PowersBenny/status/1383706876106395648

It can be detrimental to performance to set innerHTML inside the constructor. To accomplish this in a more performant way, you can create a static template and append that to the shadow dom instead.

This would be a fairly easy rule to detect and provide guidance for better perf.

@stramel stramel added help wanted Extra attention is needed new lint rule New lint rule request labels May 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed new lint rule New lint rule request
Projects
None yet
Development

No branches or pull requests

1 participant