| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 class FilteredElementList implements ElementList { | 5 class FilteredElementList implements ElementList { |
| 6 final Node _node; | 6 final Node _node; |
| 7 final NodeList _childNodes; | 7 final NodeList _childNodes; |
| 8 | 8 |
| 9 FilteredElementList(Node node): _childNodes = node.nodes, _node = node; | 9 FilteredElementList(Node node): _childNodes = node.nodes, _node = node; |
| 10 | 10 |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 void set elements(value) { | 140 void set elements(value) { |
| 141 // Copy list first since we don't want liveness during iteration. | 141 // Copy list first since we don't want liveness during iteration. |
| 142 List copy = new List.from(value); | 142 List copy = new List.from(value); |
| 143 final elements = this.elements; | 143 final elements = this.elements; |
| 144 elements.clear(); | 144 elements.clear(); |
| 145 elements.addAll(copy); | 145 elements.addAll(copy); |
| 146 } | 146 } |
| 147 | 147 |
| 148 _ElementImpl query(String selectors) => $dom_querySelector(selectors); | 148 _ElementImpl query(String selectors) => $dom_querySelector(selectors); |
| 149 | 149 |
| 150 ElementList queryAll(String selectors) => | 150 List<Element> queryAll(String selectors) => |
| 151 new _FrozenElementList._wrap($dom_querySelectorAll(selectors)); | 151 new _FrozenElementList._wrap($dom_querySelectorAll(selectors)); |
| 152 | 152 |
| 153 String get innerHTML() { | 153 String get innerHTML() { |
| 154 final e = new Element.tag("div"); | 154 final e = new Element.tag("div"); |
| 155 e.nodes.add(this.clone(true)); | 155 e.nodes.add(this.clone(true)); |
| 156 return e.innerHTML; | 156 return e.innerHTML; |
| 157 } | 157 } |
| 158 | 158 |
| 159 String get outerHTML() => innerHTML; | 159 String get outerHTML() => innerHTML; |
| 160 | 160 |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 337 "WebKit drop zone can't be set for document fragments."); | 337 "WebKit drop zone can't be set for document fragments."); |
| 338 } | 338 } |
| 339 | 339 |
| 340 void set webkitRegionOverflow(String value) { | 340 void set webkitRegionOverflow(String value) { |
| 341 throw new UnsupportedOperationException( | 341 throw new UnsupportedOperationException( |
| 342 "WebKit region overflow can't be set for document fragments."); | 342 "WebKit region overflow can't be set for document fragments."); |
| 343 } | 343 } |
| 344 | 344 |
| 345 $!MEMBERS | 345 $!MEMBERS |
| 346 } | 346 } |
| OLD | NEW |