Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

hasClass() compatible with SVG DOM where SVGAnimatedString is used #468

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
2 participants

Hi,

I'm using Zepto with SVG and it works great so far. Not sure what's the philosophy of Zepto with regards to SVG DOM but I encountered a little issue with hasClass() function which is not compatible with SVG dom.

class in SVG DOM is a SVGAnimatedString with two properties baseVal and animVal where both are of DOMString type. I'm using the baseVal value in my fix to get the proper DOMString.

If you like it, more fixes will come in all places where className is used.

Collaborator

mislav commented Apr 5, 2012

I like it. I would like fixes for all className methods, but with tests of course.

@mislav mislav closed this in 122b014 Sep 29, 2012

Collaborator

mislav commented Sep 29, 2012

All code that touches className now taught SVG. Please review. Thanks!

lopper added a commit to buddydvd/zepto that referenced this pull request Apr 24, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment