-
Notifications
You must be signed in to change notification settings - Fork 166
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
classList.add() is not working with similar strings #43
Comments
bobbykjack
added a commit
to fiveminuteargument/polyfills
that referenced
this issue
Nov 9, 2016
Contains() should use pre-computed internal list of individual classes, rather than element's className, to avoid greedy false-positives.
@remy , may I submit a pull request to fix it? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If the element has e.g: 'btn-active' class you can't add 'btn' because the indexOf already returns that it found the string 'btn' as part of 'btn-active'.
The text was updated successfully, but these errors were encountered: