Add SVG support to IE #3

Open
wants to merge 2 commits into
from

Conversation

Projects
None yet
2 participants
Contributor

ForbesLindesay commented Nov 16, 2012

You have to do a little extra work to get and set the .className attribute of SVG elements. This does that extra work

@TooTallNate TooTallNate commented on the diff Nov 15, 2013

@@ -131,3 +131,14 @@ ClassList.prototype.has = function(name){
? this.list.contains(name)
: !! ~index(this.array(), name);
};
+
+ClassList.prototype.getClassName = function(){
+ return (this.el.className instanceof SVGAnimatedString ? this.el.className.baseVal : this.el.className);
@TooTallNate

TooTallNate Nov 15, 2013

Owner

What about if SVGAnimatedString is undefined?

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