-
-
Notifications
You must be signed in to change notification settings - Fork 233
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
No normalization of add/remove/toggle in IE10 and IE11 #44
Comments
+1 having the same issue here. |
+1 on this. Having the same issue. |
@eligrey hello? |
The suggested fix here breaks SVG support in IE11. |
@tbranyen would you mind publishing and older version of this package on npm? Right now the only release on npm contains this bug. You could check out the 2014-12-13 tag and publish it as |
What about simplification? We may just use:
So the normalization would also work as expected. |
Does that detect also whether support exists for SVG elements? |
@eligrey are you deceased? |
@PatAtMacadamian comments? |
For anyone needing this, I have a pull request in, but since that will probably never get merged, you can point to my branch in your projects: https://github.com/stevenvachon/classList.js |
@stevenvachon make it available at npm, please. |
@fronteed it already is: "dependencies": {
"classlist.js": "stevenvachon/classList.js"
} |
apart from failing to normalize the api, the current toggle/force polyfill also doesn’t really conform to what everyone else is doing. while I’m not 100% sure that the spec defines this exact edge case (it comes down to the definition of what a passed value is and truthy-/falsyness), every browser seems to consider |
In my opinion Probably best to do what the majority of native browser implementations do, if the spec isn't clear enough. |
|
This should be fixed: Published via: |
I tested the polyfill in IE10 and IE11 (Win7 on a virtual machine) and the functions still have partial support of classList. Multiple parameters in the add() and remove() functions still don't work.
The last condition
!("classList" in document.createElementNS("http://www.w3.org/2000/svg", "g"))
evaluates to true, so the part for no classlist support will be executed.The part for partial classlist supported browsers won't be executed in IE10/11.
I could "fix" the issue by changing || to && in line18/19:
It seems to work for IE10/11, but don't know if is could be an issue for other browsers.
The text was updated successfully, but these errors were encountered: