Closed jantimon closed 8 years ago
@rodneyrehm could you help me out with this one? https://travis-ci.org/medialize/ally.js/builds/154397276#L2877
I implemented everything else but I am not sure if this is really a bug in this pull request
Yeah debugging things right off the tests is not a great experience :/
toggle-class.js:21 Uncaught TypeError: element.className.split is not a function
SVG elements may not only not have classList, they might also provide you with SVGAnimatedString when accessing className. This problem can most easily be resolved by using elemen.getAttribute('class')
instead of element.className
.
Took the getClass code from https://github.com/jquery/jquery/blob/305f193aa57014dc7d8fa0739a3fefd47166cd44/src/attributes/classes.js#L12-L14 Looks like it works now.
This pull request removes the domtoken list dependency and implements the class adding/removing by its own.