| 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 $LIBRARYNAME; | 5 part of $LIBRARYNAME; |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * Lazy implementation of the child nodes of an element that does not request | 8 * Lazy implementation of the child nodes of an element that does not request |
| 9 * the actual child nodes of an element until strictly necessary greatly | 9 * the actual child nodes of an element until strictly necessary greatly |
| 10 * improving performance for the typical cases where it is not required. | 10 * improving performance for the typical cases where it is not required. |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 var result = this[index]; | 86 var result = this[index]; |
| 87 if (result != null) { | 87 if (result != null) { |
| 88 _this.$dom_removeChild(result); | 88 _this.$dom_removeChild(result); |
| 89 } | 89 } |
| 90 return result; | 90 return result; |
| 91 } | 91 } |
| 92 | 92 |
| 93 void remove(Object object) { | 93 void remove(Object object) { |
| 94 if (object is! Node) return; | 94 if (object is! Node) return; |
| 95 Node node = object; | 95 Node node = object; |
| 96 if (!identical(this, node.parentNode)) return; | 96 if (!identical(_this, node.parentNode)) return; |
| 97 _this.$dom_removeChild(node); | 97 _this.$dom_removeChild(node); |
| 98 } | 98 } |
| 99 | 99 |
| 100 void removeAll(Iterable elements) { | 100 void removeAll(Iterable elements) { |
| 101 IterableMixinWorkaround.removeAll(this, elements); | 101 IterableMixinWorkaround.removeAll(this, elements); |
| 102 } | 102 } |
| 103 | 103 |
| 104 void retainAll(Iterable elements) { | 104 void retainAll(Iterable elements) { |
| 105 IterableMixinWorkaround.retainAll(this, elements); | 105 IterableMixinWorkaround.retainAll(this, elements); |
| 106 } | 106 } |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 280 final Node parent = this.parentNode; | 280 final Node parent = this.parentNode; |
| 281 parent.$dom_replaceChild(otherNode, this); | 281 parent.$dom_replaceChild(otherNode, this); |
| 282 } catch (e) { | 282 } catch (e) { |
| 283 | 283 |
| 284 }; | 284 }; |
| 285 return this; | 285 return this; |
| 286 } | 286 } |
| 287 | 287 |
| 288 $!MEMBERS | 288 $!MEMBERS |
| 289 } | 289 } |
| OLD | NEW |