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 class _ChildrenElementList extends ListBase<Element> { | 7 class _ChildrenElementList extends ListBase<Element> { |
8 // Raw Element. | 8 // Raw Element. |
9 final Element _element; | 9 final Element _element; |
10 final HtmlCollection _childElements; | 10 final HtmlCollection _childElements; |
(...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
571 children.clear(); | 571 children.clear(); |
572 children.addAll(copy); | 572 children.addAll(copy); |
573 } | 573 } |
574 | 574 |
575 /** | 575 /** |
576 * Finds all descendent elements of this element that match the specified | 576 * Finds all descendent elements of this element that match the specified |
577 * group of selectors. | 577 * group of selectors. |
578 * | 578 * |
579 * [selectors] should be a string using CSS selector syntax. | 579 * [selectors] should be a string using CSS selector syntax. |
580 * | 580 * |
581 * var items = element.query('.itemClassName'); | 581 * var items = element.querySelectorAll('.itemClassName'); |
582 */ | 582 */ |
583 ElementList queryAll(String selectors) => | 583 @DomName('Element.querySelectorAll') |
| 584 ElementList querySelectorAll(String selectors) => |
584 new _FrozenElementList._wrap(_querySelectorAll(selectors)); | 585 new _FrozenElementList._wrap(_querySelectorAll(selectors)); |
585 | 586 |
| 587 /** |
| 588 * Alias for [querySelector]. Note this function is deprecated because its |
| 589 * semantics will be changing in the future. |
| 590 */ |
| 591 @deprecated |
| 592 @DomName('Element.querySelector') |
| 593 @Experimental() |
| 594 Element query(String relativeSelectors) => querySelector(relativeSelectors); |
| 595 |
| 596 /** |
| 597 * Alias for [querySelectorAll]. Note this function is deprecated because its |
| 598 * semantics will be changing in the future. |
| 599 */ |
| 600 @deprecated |
| 601 @DomName('Element.querySelectorAll') |
| 602 @Experimental() |
| 603 ElementList queryAll(String relativeSelectors) => |
| 604 querySelectorAll(relativeSelectors); |
| 605 |
586 /** | 606 /** |
587 * The set of CSS classes applied to this element. | 607 * The set of CSS classes applied to this element. |
588 * | 608 * |
589 * This set makes it easy to add, remove or toggle the classes applied to | 609 * This set makes it easy to add, remove or toggle the classes applied to |
590 * this element. | 610 * this element. |
591 * | 611 * |
592 * element.classes.add('selected'); | 612 * element.classes.add('selected'); |
593 * element.classes.toggle('isOnline'); | 613 * element.classes.toggle('isOnline'); |
594 * element.classes.remove('selected'); | 614 * element.classes.remove('selected'); |
595 */ | 615 */ |
(...skipping 802 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1398 const ScrollAlignment._internal(this._value); | 1418 const ScrollAlignment._internal(this._value); |
1399 toString() => 'ScrollAlignment.$_value'; | 1419 toString() => 'ScrollAlignment.$_value'; |
1400 | 1420 |
1401 /// Attempt to align the element to the top of the scrollable area. | 1421 /// Attempt to align the element to the top of the scrollable area. |
1402 static const TOP = const ScrollAlignment._internal('TOP'); | 1422 static const TOP = const ScrollAlignment._internal('TOP'); |
1403 /// Attempt to center the element in the scrollable area. | 1423 /// Attempt to center the element in the scrollable area. |
1404 static const CENTER = const ScrollAlignment._internal('CENTER'); | 1424 static const CENTER = const ScrollAlignment._internal('CENTER'); |
1405 /// Attempt to align the element to the bottom of the scrollable area. | 1425 /// Attempt to align the element to the bottom of the scrollable area. |
1406 static const BOTTOM = const ScrollAlignment._internal('BOTTOM'); | 1426 static const BOTTOM = const ScrollAlignment._internal('BOTTOM'); |
1407 } | 1427 } |
OLD | NEW |