| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 html; | 5 part of html; |
| 6 | 6 |
| 7 // TODO(jacobr): use _Lists.dart to remove some of the duplicated | 7 // TODO(jacobr): use _Lists.dart to remove some of the duplicated |
| 8 // functionality. | 8 // functionality. |
| 9 class _ChildrenElementList implements List { | 9 class _ChildrenElementList implements List { |
| 10 // Raw Element. | 10 // Raw Element. |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 return IterableMixinWorkaround.reduce(this, initialValue, combine); | 146 return IterableMixinWorkaround.reduce(this, initialValue, combine); |
| 147 } | 147 } |
| 148 | 148 |
| 149 void setRange(int start, int rangeLength, List from, [int startFrom = 0]) { | 149 void setRange(int start, int rangeLength, List from, [int startFrom = 0]) { |
| 150 throw new UnimplementedError(); | 150 throw new UnimplementedError(); |
| 151 } | 151 } |
| 152 | 152 |
| 153 void remove(Object object) { | 153 void remove(Object object) { |
| 154 if (object is Element) { | 154 if (object is Element) { |
| 155 Element element = object; | 155 Element element = object; |
| 156 if (identical(element.parentNode, this)) { | 156 if (identical(element.parentNode, _element)) { |
| 157 _element.$dom_removeChild(element); | 157 _element.$dom_removeChild(element); |
| 158 } | 158 } |
| 159 } | 159 } |
| 160 } | 160 } |
| 161 | 161 |
| 162 void removeAll(Iterable elements) { | 162 void removeAll(Iterable elements) { |
| 163 IterableMixinWorkaround.removeAll(this, elements); | 163 IterableMixinWorkaround.removeAll(this, elements); |
| 164 } | 164 } |
| 165 | 165 |
| 166 void retainAll(Iterable elements) { | 166 void retainAll(Iterable elements) { |
| (...skipping 871 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1038 $if DART2JS | 1038 $if DART2JS |
| 1039 // Optimization to improve performance until the dart2js compiler inlines this | 1039 // Optimization to improve performance until the dart2js compiler inlines this |
| 1040 // method. | 1040 // method. |
| 1041 static dynamic createElement_tag(String tag) => | 1041 static dynamic createElement_tag(String tag) => |
| 1042 JS('Element', 'document.createElement(#)', tag); | 1042 JS('Element', 'document.createElement(#)', tag); |
| 1043 $else | 1043 $else |
| 1044 static Element createElement_tag(String tag) => | 1044 static Element createElement_tag(String tag) => |
| 1045 document.$dom_createElement(tag); | 1045 document.$dom_createElement(tag); |
| 1046 $endif | 1046 $endif |
| 1047 } | 1047 } |
| OLD | NEW |