OLD | NEW |
1 #library('html'); | 1 #library('html'); |
2 | 2 |
3 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 3 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
4 // for details. All rights reserved. Use of this source code is governed by a | 4 // for details. All rights reserved. Use of this source code is governed by a |
5 // BSD-style license that can be found in the LICENSE file. | 5 // BSD-style license that can be found in the LICENSE file. |
6 | 6 |
7 // DO NOT EDIT | 7 // DO NOT EDIT |
8 // Auto-generated dart:html library. | 8 // Auto-generated dart:html library. |
9 | 9 |
10 | 10 |
(...skipping 31083 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
31094 e.innerHTML = svg; | 31094 e.innerHTML = svg; |
31095 | 31095 |
31096 // Copy list first since we don't want liveness during iteration. | 31096 // Copy list first since we don't want liveness during iteration. |
31097 final List nodes = new List.from(e.nodes); | 31097 final List nodes = new List.from(e.nodes); |
31098 fragment.nodes.addAll(nodes); | 31098 fragment.nodes.addAll(nodes); |
31099 return fragment; | 31099 return fragment; |
31100 } | 31100 } |
31101 } | 31101 } |
31102 | 31102 |
31103 class _SVGElementFactoryProvider { | 31103 class _SVGElementFactoryProvider { |
31104 factory SVGElement.tag(String tag) => | 31104 factory SVGElement.tag(String tag) { |
31105 _document._createElementNS("http://www.w3.org/2000/svg", tag); | 31105 final Element temp = |
| 31106 _document._createElementNS("http://www.w3.org/2000/svg", tag); |
| 31107 return temp; |
| 31108 } |
31106 | 31109 |
31107 factory SVGElement.svg(String svg) { | 31110 factory SVGElement.svg(String svg) { |
31108 Element parentTag; | 31111 Element parentTag; |
31109 final match = _START_TAG_REGEXP.firstMatch(svg); | 31112 final match = _START_TAG_REGEXP.firstMatch(svg); |
31110 if (match != null && match.group(1).toLowerCase() == 'svg') { | 31113 if (match != null && match.group(1).toLowerCase() == 'svg') { |
31111 parentTag = new Element.tag('div'); | 31114 parentTag = new Element.tag('div'); |
31112 } else { | 31115 } else { |
31113 parentTag = new SVGSVGElement(); | 31116 parentTag = new SVGSVGElement(); |
31114 } | 31117 } |
31115 | 31118 |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
31333 if (length < 0) throw new IllegalArgumentException('length'); | 31336 if (length < 0) throw new IllegalArgumentException('length'); |
31334 if (start < 0) throw new IndexOutOfRangeException(start); | 31337 if (start < 0) throw new IndexOutOfRangeException(start); |
31335 int end = start + length; | 31338 int end = start + length; |
31336 if (end > a.length) throw new IndexOutOfRangeException(end); | 31339 if (end > a.length) throw new IndexOutOfRangeException(end); |
31337 for (int i = start; i < end; i++) { | 31340 for (int i = start; i < end; i++) { |
31338 accumulator.add(a[i]); | 31341 accumulator.add(a[i]); |
31339 } | 31342 } |
31340 return accumulator; | 31343 return accumulator; |
31341 } | 31344 } |
31342 } | 31345 } |
OLD | NEW |