| 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 part of $LIBRARYNAME; | 5 part of $LIBRARYNAME; |
| 6 | 6 |
| 7 $(ANNOTATIONS)$(NATIVESPEC)$(CLASS_MODIFIERS)class $CLASSNAME$EXTENDS$IMPLEMENTS
{ | 7 $(ANNOTATIONS)$(NATIVESPEC)$(CLASS_MODIFIERS)class $CLASSNAME$EXTENDS$IMPLEMENTS
{ |
| 8 factory $CLASSNAME() => document.createDocumentFragment(); | 8 factory $CLASSNAME() => document.createDocumentFragment(); |
| 9 | 9 |
| 10 factory $CLASSNAME.html(String html, | 10 factory $CLASSNAME.html(String html, |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 | 33 |
| 34 List<Element> get children { | 34 List<Element> get children { |
| 35 if (_docChildren == null) { | 35 if (_docChildren == null) { |
| 36 _docChildren = new FilteredElementList(this); | 36 _docChildren = new FilteredElementList(this); |
| 37 } | 37 } |
| 38 return _docChildren; | 38 return _docChildren; |
| 39 } | 39 } |
| 40 | 40 |
| 41 set children(List<Element> value) { | 41 set children(List<Element> value) { |
| 42 // Copy list first since we don't want liveness during iteration. | 42 // Copy list first since we don't want liveness during iteration. |
| 43 List copy = new List.from(value); | 43 var copy = value.toList(); |
| 44 var children = this.children; | 44 var children = this.children; |
| 45 children.clear(); | 45 children.clear(); |
| 46 children.addAll(copy); | 46 children.addAll(copy); |
| 47 } | 47 } |
| 48 | 48 |
| 49 /** | 49 /** |
| 50 * Finds all descendant elements of this document fragment that match the | 50 * Finds all descendant elements of this document fragment that match the |
| 51 * specified group of selectors. | 51 * specified group of selectors. |
| 52 * | 52 * |
| 53 * [selectors] should be a string using CSS selector syntax. | 53 * [selectors] should be a string using CSS selector syntax. |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 * semantics will be changing in the future. | 113 * semantics will be changing in the future. |
| 114 */ | 114 */ |
| 115 @deprecated | 115 @deprecated |
| 116 @Experimental() | 116 @Experimental() |
| 117 @DomName('DocumentFragment.querySelectorAll') | 117 @DomName('DocumentFragment.querySelectorAll') |
| 118 ElementList<Element> queryAll(String relativeSelectors) { | 118 ElementList<Element> queryAll(String relativeSelectors) { |
| 119 return querySelectorAll(relativeSelectors); | 119 return querySelectorAll(relativeSelectors); |
| 120 } | 120 } |
| 121 $!MEMBERS | 121 $!MEMBERS |
| 122 } | 122 } |
| OLD | NEW |