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

Check if addClass is truthy before adding it to element #81

Merged
merged 1 commit into from
Nov 2, 2023
Merged

Check if addClass is truthy before adding it to element #81

merged 1 commit into from
Nov 2, 2023

Commits on Nov 2, 2023

  1. Check if addClass is truthy before adding it to element

    DOMTokenList::add() throws a DOMException if you try to add an empty string as a class. This check prevents this from happening so that you can set ValidationInputValidCssClassName etc. to an empty string if you don't want to add classes for valid input fields or messages for instance.
    davidkarlsson committed Nov 2, 2023
    Configuration menu
    Copy the full SHA
    2525091 View commit details
    Browse the repository at this point in the history