IE11/10 multiple argument remove and add not working due to SVG test
See original GitHub issueNear the top of the code you check for:
!("classList"
in document.createElementNS(“http://www.w3.org/2000/svg","g”))
IE11 and 10 will fail that test and therefore should run the code for the polyfill. But, IE11 and 10 do provide native support but lacks SVG support and lacks multiple classname arguments for add() and remove(). (Reference: http://caniuse.com/#search=classlist)
The code within the else of that same if statement contains a polyfill to add multiple argument support to add() and remove(). There is a comment in that block of code that says “Polyfill for IE 10/11 and Firefox <26.” But IE11 does not get to that point.
Are you still maintaining this library? If you are no longer maintaining, please let me know if there is a reason you stopped other than limited time to so do. If you believe addressing this potential bug is needed but you don’t have time, let me know and I’d be happy to dig in deeper.
BTW, I took a quick look at the unit tests and it appears we may be should add testing of multiple arguments for add() and remove() as well.
Issue Analytics
- State:
- Created 7 years ago
- Comments:16 (1 by maintainers)
Top GitHub Comments
@beck is the worst though (for reasons unrelated to this conversation).
Fix merged. Published at: https://github.com/yola/classlist-polyfill