| 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 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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, this)) { |
| 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 Collections.removeAll(this, elements); | 163 IterableMixinWorkaround.removeAll(this, elements); |
| 164 } | 164 } |
| 165 | 165 |
| 166 void retainAll(Iterable elements) { | 166 void retainAll(Iterable elements) { |
| 167 Collections.retainAll(this, elements); | 167 IterableMixinWorkaround.retainAll(this, elements); |
| 168 } | 168 } |
| 169 | 169 |
| 170 void removeMatching(bool test(Element element)) { | 170 void removeMatching(bool test(Element element)) { |
| 171 Collections.removeMatching(this, test); | 171 IterableMixinWorkaround.removeMatching(this, test); |
| 172 } | 172 } |
| 173 | 173 |
| 174 void retainMatching(bool test(Element element)) { | 174 void retainMatching(bool test(Element element)) { |
| 175 Collections.retainMatching(this, test); | 175 IterableMixinWorkaround.retainMatching(this, test); |
| 176 } | 176 } |
| 177 | 177 |
| 178 void removeRange(int start, int rangeLength) { | 178 void removeRange(int start, int rangeLength) { |
| 179 throw new UnimplementedError(); | 179 throw new UnimplementedError(); |
| 180 } | 180 } |
| 181 | 181 |
| 182 void insertRange(int start, int rangeLength, [initialValue = null]) { | 182 void insertRange(int start, int rangeLength, [initialValue = null]) { |
| 183 throw new UnimplementedError(); | 183 throw new UnimplementedError(); |
| 184 } | 184 } |
| 185 | 185 |
| (...skipping 852 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 |