| 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 implements NodeListWrapper { | 8 implements NodeListWrapper { |
| 9 // Raw Element. | 9 // Raw Element. |
| 10 final Element _element; | 10 final Element _element; |
| (...skipping 765 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 776 get xtag => _xtag != null ? _xtag : this; | 776 get xtag => _xtag != null ? _xtag : this; |
| 777 | 777 |
| 778 void set xtag(Element value) { | 778 void set xtag(Element value) { |
| 779 _xtag = value; | 779 _xtag = value; |
| 780 } | 780 } |
| 781 | 781 |
| 782 @DomName('Element.localName') | 782 @DomName('Element.localName') |
| 783 @DocsEditable() | 783 @DocsEditable() |
| 784 String get localName => _localName; | 784 String get localName => _localName; |
| 785 | 785 |
| 786 /** |
| 787 * A URI that identifies the XML namespace of this element. |
| 788 * |
| 789 * `null` if no namespace URI is specified. |
| 790 * |
| 791 * ## Other resources |
| 792 * |
| 793 * * [Node.namespaceURI] |
| 794 * (http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-NodeNSname) from W3C. |
| 795 */ |
| 786 @DomName('Element.namespaceUri') | 796 @DomName('Element.namespaceUri') |
| 787 @DocsEditable() | |
| 788 String get namespaceUri => _namespaceUri; | 797 String get namespaceUri => _namespaceUri; |
| 789 | 798 |
| 790 String toString() => localName; | 799 String toString() => localName; |
| 791 | 800 |
| 792 /** | 801 /** |
| 793 * Scrolls this element into view. | 802 * Scrolls this element into view. |
| 794 * | 803 * |
| 795 * Only one of of the alignment options may be specified at a time. | 804 * Only one of of the alignment options may be specified at a time. |
| 796 * | 805 * |
| 797 * If no options are specified then this will attempt to scroll the minimum | 806 * If no options are specified then this will attempt to scroll the minimum |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 995 bool matchesWithAncestors(String selectors) { | 1004 bool matchesWithAncestors(String selectors) { |
| 996 var elem = this; | 1005 var elem = this; |
| 997 do { | 1006 do { |
| 998 if (elem.matches(selectors)) return true; | 1007 if (elem.matches(selectors)) return true; |
| 999 elem = elem.parent; | 1008 elem = elem.parent; |
| 1000 } while(elem != null); | 1009 } while(elem != null); |
| 1001 return false; | 1010 return false; |
| 1002 } | 1011 } |
| 1003 | 1012 |
| 1004 $if DART2JS | 1013 $if DART2JS |
| 1014 /** |
| 1015 * Creates a new shadow root for this shadow host. |
| 1016 * |
| 1017 * ## Other resources |
| 1018 * |
| 1019 * * [Shadow DOM 101] |
| 1020 * (http://www.html5rocks.com/en/tutorials/webcomponents/shadowdom/) |
| 1021 * from HTML5Rocks. |
| 1022 * * [Shadow DOM specification] |
| 1023 * (http://www.w3.org/TR/shadow-dom/) from W3C. |
| 1024 */ |
| 1005 @DomName('Element.createShadowRoot') | 1025 @DomName('Element.createShadowRoot') |
| 1006 @SupportedBrowser(SupportedBrowser.CHROME, '25') | 1026 @SupportedBrowser(SupportedBrowser.CHROME, '25') |
| 1007 @Experimental() | 1027 @Experimental() |
| 1008 ShadowRoot createShadowRoot() { | 1028 ShadowRoot createShadowRoot() { |
| 1009 return JS('ShadowRoot', | 1029 return JS('ShadowRoot', |
| 1010 '(#.createShadowRoot || #.webkitCreateShadowRoot).call(#)', | 1030 '(#.createShadowRoot || #.webkitCreateShadowRoot).call(#)', |
| 1011 this, this, this); | 1031 this, this, this); |
| 1012 } | 1032 } |
| 1013 | 1033 |
| 1034 /** |
| 1035 * The shadow root of this shadow host. |
| 1036 * |
| 1037 * ## Other resources |
| 1038 * |
| 1039 * * [Shadow DOM 101] |
| 1040 * (http://www.html5rocks.com/en/tutorials/webcomponents/shadowdom/) |
| 1041 * from HTML5Rocks. |
| 1042 * * [Shadow DOM specification] |
| 1043 * (http://www.w3.org/TR/shadow-dom/) from W3C. |
| 1044 */ |
| 1014 @DomName('Element.shadowRoot') | 1045 @DomName('Element.shadowRoot') |
| 1015 @SupportedBrowser(SupportedBrowser.CHROME, '25') | 1046 @SupportedBrowser(SupportedBrowser.CHROME, '25') |
| 1016 @Experimental() | 1047 @Experimental() |
| 1017 ShadowRoot get shadowRoot => | 1048 ShadowRoot get shadowRoot => |
| 1018 JS('ShadowRoot|Null', '#.shadowRoot || #.webkitShadowRoot', this, this); | 1049 JS('ShadowRoot|Null', '#.shadowRoot || #.webkitShadowRoot', this, this); |
| 1019 $endif | 1050 $endif |
| 1020 | 1051 |
| 1021 /** | 1052 /** |
| 1022 * Access this element's content position. | 1053 * Access this element's content position. |
| 1023 * | 1054 * |
| (...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1301 const ScrollAlignment._internal(this._value); | 1332 const ScrollAlignment._internal(this._value); |
| 1302 toString() => 'ScrollAlignment.$_value'; | 1333 toString() => 'ScrollAlignment.$_value'; |
| 1303 | 1334 |
| 1304 /// Attempt to align the element to the top of the scrollable area. | 1335 /// Attempt to align the element to the top of the scrollable area. |
| 1305 static const TOP = const ScrollAlignment._internal('TOP'); | 1336 static const TOP = const ScrollAlignment._internal('TOP'); |
| 1306 /// Attempt to center the element in the scrollable area. | 1337 /// Attempt to center the element in the scrollable area. |
| 1307 static const CENTER = const ScrollAlignment._internal('CENTER'); | 1338 static const CENTER = const ScrollAlignment._internal('CENTER'); |
| 1308 /// Attempt to align the element to the bottom of the scrollable area. | 1339 /// Attempt to align the element to the bottom of the scrollable area. |
| 1309 static const BOTTOM = const ScrollAlignment._internal('BOTTOM'); | 1340 static const BOTTOM = const ScrollAlignment._internal('BOTTOM'); |
| 1310 } | 1341 } |
| OLD | NEW |