Index: tools/dom/templates/html/impl/impl_SVGElement.darttemplate |
diff --git a/tools/dom/templates/html/impl/impl_SVGElement.darttemplate b/tools/dom/templates/html/impl/impl_SVGElement.darttemplate |
index 886d783376fee336dd16049b44910c1ccdf9516c..384aac70fab5c844332cb3e603eb4e9f661403e0 100644 |
--- a/tools/dom/templates/html/impl/impl_SVGElement.darttemplate |
+++ b/tools/dom/templates/html/impl/impl_SVGElement.darttemplate |
@@ -4,13 +4,16 @@ |
part of $LIBRARYNAME; |
-class _AttributeClassSet extends CssClassSetImpl { |
+class AttributeClassSet extends CssClassSetImpl { |
final Element _element; |
- _AttributeClassSet(this._element); |
+ AttributeClassSet(this._element); |
Set<String> readClasses() { |
var classname = _element.attributes['class']; |
+ if (classname is AnimatedString) { |
+ classname = classname.baseVal; |
+ } |
Set<String> s = new LinkedHashSet<String>(); |
if (classname == null) { |
@@ -26,7 +29,7 @@ class _AttributeClassSet extends CssClassSetImpl { |
} |
void writeClasses(Set s) { |
- _element.attributes['class'] = s.join(' '); |
+ _element.setAttribute('class', s.join(' ')); |
} |
} |
@@ -54,7 +57,7 @@ $(ANNOTATIONS)$(NATIVESPEC)$(CLASS_MODIFIERS)class $CLASSNAME$EXTENDS$IMPLEMENTS |
return fragment.nodes.where((e) => e is SvgElement).single; |
} |
- CssClassSet get classes => new _AttributeClassSet(this); |
+ CssClassSet get classes => new AttributeClassSet(this); |
List<Element> get children => new FilteredElementList(this); |