-
Notifications
You must be signed in to change notification settings - Fork 47k
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
Setting custom data attributes starting with numbers are removed #4772
Comments
It is currently expected behavior with our code (our regexp: I was going to say that it doesn't actually work and @syranide - do you remember if we ever talked about numbers? |
Hi, I got same problem when I used this dense.js and tried to set a custom data attribute such as data-2x = "xxx". Will this behavior be accepted in the future? |
I'm not sure what dense.js has to do with this issue, but I think this is a duplicate of #2329 which was fixed in #5216 and appears to work on latest http://jsfiddle.net/8pLf9dbw/ |
@jimfb thanks for your answer. (I mentioned dense only because I got this problem when i was using it.) I check your jsfiddle. That's my problem and it looks working great. However, does it work in es5? Here is my jsfiddle: https://jsfiddle.net/garylai/Lbe2auh3/1/ The data-0 attribute didn't show correctly. |
@imgarylai |
@cody is correct. @imgarylai Yes, it works on es5: http://jsfiddle.net/1LgLy7mL/ |
Setting a custom data attribute such as data-test="" works, whereas data-0="" would fail.
Is this expected behaviour?
The text was updated successfully, but these errors were encountered: