| 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 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 => this._insertAdjacentNode(where, element); | 190 => this._insertAdjacentNode(where, element); |
| 191 | 191 |
| 192 void insertAdjacentText(String where, String text) { | 192 void insertAdjacentText(String where, String text) { |
| 193 this._insertAdjacentNode(where, new Text(text)); | 193 this._insertAdjacentNode(where, new Text(text)); |
| 194 } | 194 } |
| 195 | 195 |
| 196 void insertAdjacentHTML(String where, String text) { | 196 void insertAdjacentHTML(String where, String text) { |
| 197 this._insertAdjacentNode(where, new DocumentFragment.html(text)); | 197 this._insertAdjacentNode(where, new DocumentFragment.html(text)); |
| 198 } | 198 } |
| 199 | 199 |
| 200 void addText(String text) { |
| 201 this.insertAdjacentText('beforeend', text); |
| 202 } |
| 203 |
| 204 void addHTML(String text) { |
| 205 this.insertAdjacentHTML('beforeend', text); |
| 206 } |
| 207 |
| 200 Future<ElementRect> get rect() { | 208 Future<ElementRect> get rect() { |
| 201 return _createMeasurementFuture(() => const EmptyElementRect(), | 209 return _createMeasurementFuture(() => const EmptyElementRect(), |
| 202 new Completer<ElementRect>()); | 210 new Completer<ElementRect>()); |
| 203 } | 211 } |
| 204 | 212 |
| 205 // If we can come up with a semi-reasonable default value for an Element | 213 // If we can come up with a semi-reasonable default value for an Element |
| 206 // getter, we'll use it. In general, these return the same values as an | 214 // getter, we'll use it. In general, these return the same values as an |
| 207 // element that has no parent. | 215 // element that has no parent. |
| 208 String get contentEditable() => "false"; | 216 String get contentEditable() => "false"; |
| 209 bool get isContentEditable() => false; | 217 bool get isContentEditable() => false; |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 337 "WebKit drop zone can't be set for document fragments."); | 345 "WebKit drop zone can't be set for document fragments."); |
| 338 } | 346 } |
| 339 | 347 |
| 340 void set webkitRegionOverflow(String value) { | 348 void set webkitRegionOverflow(String value) { |
| 341 throw new UnsupportedOperationException( | 349 throw new UnsupportedOperationException( |
| 342 "WebKit region overflow can't be set for document fragments."); | 350 "WebKit region overflow can't be set for document fragments."); |
| 343 } | 351 } |
| 344 | 352 |
| 345 $!MEMBERS | 353 $!MEMBERS |
| 346 } | 354 } |
| OLD | NEW |