OLD | NEW |
---|---|
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 part of $LIBRARYNAME; | 5 part of $LIBRARYNAME; |
6 | 6 |
7 class _AttributeClassSet extends CssClassSetImpl { | 7 class _AttributeClassSet extends CssClassSetImpl { |
8 final Element _element; | 8 final Element _element; |
9 | 9 |
10 _AttributeClassSet(this._element); | 10 _AttributeClassSet(this._element); |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
136 | 136 |
137 /** | 137 /** |
138 * Checks to see if the SVG element type is supported by the current platform. | 138 * Checks to see if the SVG element type is supported by the current platform. |
139 * | 139 * |
140 * The tag should be a valid SVG element tag name. | 140 * The tag should be a valid SVG element tag name. |
141 */ | 141 */ |
142 static bool isTagSupported(String tag) { | 142 static bool isTagSupported(String tag) { |
143 var e = new $CLASSNAME.tag(tag); | 143 var e = new $CLASSNAME.tag(tag); |
144 return e is $CLASSNAME && !(e is UnknownElement); | 144 return e is $CLASSNAME && !(e is UnknownElement); |
145 } | 145 } |
146 | |
147 $if JSINTEROP | |
148 String get className => _svgClassName.baseVal; | |
149 | |
150 // Unbelievable hack. We can't create an SvgAnimatedString, but we can get | |
151 // the existing one and change its baseVal. | |
152 // TODO(alanknight): Handle suppressing the SVGAnimated<*> better | |
153 set className(String s) { | |
154 var oldClass = _svgClassName; | |
155 oldClass.baseVal = s; | |
156 super.className = oldClass; | |
157 } | |
158 $endif | |
terry
2015/08/17 14:40:29
Is it a bug that we can't create an SvgAnimatedStr
| |
146 $!MEMBERS | 159 $!MEMBERS |
147 } | 160 } |
OLD | NEW |