| 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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 */ | 86 */ |
| 87 void appendText(String text) { | 87 void appendText(String text) { |
| 88 this.append(new Text(text)); | 88 this.append(new Text(text)); |
| 89 } | 89 } |
| 90 | 90 |
| 91 | 91 |
| 92 /** | 92 /** |
| 93 * Parses the specified text as HTML and adds the resulting node after the | 93 * Parses the specified text as HTML and adds the resulting node after the |
| 94 * last child of this document fragment. | 94 * last child of this document fragment. |
| 95 */ | 95 */ |
| 96 void appendHtml(String text, {NodeValidator validator, | 96 void appendHtml(String text) { |
| 97 NodeTreeSanitizer, treeSanitizer}) { | 97 this.append(new DocumentFragment.html(text)); |
| 98 this.append(new DocumentFragment.html(text, validator: validator, | |
| 99 treeSanitizer: treeSanitizer)); | |
| 100 } | 98 } |
| 101 | 99 |
| 102 /** | 100 /** |
| 103 * Alias for [querySelector]. Note this function is deprecated because its | 101 * Alias for [querySelector]. Note this function is deprecated because its |
| 104 * semantics will be changing in the future. | 102 * semantics will be changing in the future. |
| 105 */ | 103 */ |
| 106 @deprecated | 104 @deprecated |
| 107 @Experimental() | 105 @Experimental() |
| 108 @DomName('DocumentFragment.querySelector') | 106 @DomName('DocumentFragment.querySelector') |
| 109 Element query(String relativeSelectors) { | 107 Element query(String relativeSelectors) { |
| 110 return querySelector(relativeSelectors); | 108 return querySelector(relativeSelectors); |
| 111 } | 109 } |
| 112 | 110 |
| 113 /** | 111 /** |
| 114 * Alias for [querySelectorAll]. Note this function is deprecated because its | 112 * Alias for [querySelectorAll]. Note this function is deprecated because its |
| 115 * semantics will be changing in the future. | 113 * semantics will be changing in the future. |
| 116 */ | 114 */ |
| 117 @deprecated | 115 @deprecated |
| 118 @Experimental() | 116 @Experimental() |
| 119 @DomName('DocumentFragment.querySelectorAll') | 117 @DomName('DocumentFragment.querySelectorAll') |
| 120 ElementList<Element> queryAll(String relativeSelectors) { | 118 ElementList<Element> queryAll(String relativeSelectors) { |
| 121 return querySelectorAll(relativeSelectors); | 119 return querySelectorAll(relativeSelectors); |
| 122 } | 120 } |
| 123 $!MEMBERS | 121 $!MEMBERS |
| 124 } | 122 } |
| OLD | NEW |