OLD | NEW |
1 /** | 1 /** |
2 * Scalable Vector Graphics: | 2 * Scalable Vector Graphics: |
3 * Two-dimensional vector graphics with support for events and animation. | 3 * Two-dimensional vector graphics with support for events and animation. |
4 * | 4 * |
5 * For details about the features and syntax of SVG, a W3C standard, | 5 * For details about the features and syntax of SVG, a W3C standard, |
6 * refer to the | 6 * refer to the |
7 * [Scalable Vector Graphics Specification](http://www.w3.org/TR/SVG/). | 7 * [Scalable Vector Graphics Specification](http://www.w3.org/TR/SVG/). |
8 */ | 8 */ |
9 library dart.dom.svg; | 9 library dart.dom.svg; |
10 | 10 |
(...skipping 7000 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7011 | 7011 |
7012 /** | 7012 /** |
7013 * Checks to see if the SVG element type is supported by the current platform. | 7013 * Checks to see if the SVG element type is supported by the current platform. |
7014 * | 7014 * |
7015 * The tag should be a valid SVG element tag name. | 7015 * The tag should be a valid SVG element tag name. |
7016 */ | 7016 */ |
7017 static bool isTagSupported(String tag) { | 7017 static bool isTagSupported(String tag) { |
7018 var e = new SvgElement.tag(tag); | 7018 var e = new SvgElement.tag(tag); |
7019 return e is SvgElement && !(e is UnknownElement); | 7019 return e is SvgElement && !(e is UnknownElement); |
7020 } | 7020 } |
| 7021 |
| 7022 String get className => _svgClassName.baseVal; |
| 7023 |
| 7024 // Unbelievable hack. We can't create an SvgAnimatedString, but we can get |
| 7025 // the existing one and change its baseVal. |
| 7026 // TODO(alanknight): Handle suppressing the SVGAnimated<*> better |
| 7027 set className(String s) { |
| 7028 var oldClass = _svgClassName; |
| 7029 oldClass.baseVal = s; |
| 7030 super.className = oldClass; |
| 7031 } |
7021 // To suppress missing implicit constructor warnings. | 7032 // To suppress missing implicit constructor warnings. |
7022 factory SvgElement._() { throw new UnsupportedError("Not supported"); } | 7033 factory SvgElement._() { throw new UnsupportedError("Not supported"); } |
7023 | 7034 |
7024 @DomName('SVGElement.abortEvent') | 7035 @DomName('SVGElement.abortEvent') |
7025 @DocsEditable() | 7036 @DocsEditable() |
7026 @Experimental() // untriaged | 7037 @Experimental() // untriaged |
7027 static const EventStreamProvider<Event> abortEvent = const EventStreamProvider
<Event>('abort'); | 7038 static const EventStreamProvider<Event> abortEvent = const EventStreamProvider
<Event>('abort'); |
7028 | 7039 |
7029 @DomName('SVGElement.blurEvent') | 7040 @DomName('SVGElement.blurEvent') |
7030 @DocsEditable() | 7041 @DocsEditable() |
(...skipping 2460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9491 _SVGVKernElement.internal_() : super.internal_(); | 9502 _SVGVKernElement.internal_() : super.internal_(); |
9492 | 9503 |
9493 /** | 9504 /** |
9494 * Constructor instantiated by the DOM when a custom element has been created. | 9505 * Constructor instantiated by the DOM when a custom element has been created. |
9495 * | 9506 * |
9496 * This can only be called by subclasses from their created constructor. | 9507 * This can only be called by subclasses from their created constructor. |
9497 */ | 9508 */ |
9498 _SVGVKernElement.created() : super.created(); | 9509 _SVGVKernElement.created() : super.created(); |
9499 | 9510 |
9500 } | 9511 } |
OLD | NEW |