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

js: make use of implicit casts #783

Open
jvoisin opened this issue Dec 14, 2024 · 0 comments
Open

js: make use of implicit casts #783

jvoisin opened this issue Dec 14, 2024 · 0 comments

Comments

@jvoisin
Copy link

jvoisin commented Dec 14, 2024

Some methods like setAttribute are automatically casting their parameters to the designed types:

e.setAttribute("tabindex","0")

can be simplified to

e.setAttribute("tabindex",0)

As the documentation says:

Any non-string value specified is converted automatically into a string.

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

No branches or pull requests

1 participant