Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(320)

Side by Side Diff: tools/dom/templates/html/impl/impl_DocumentFragment.darttemplate

Issue 12219002: 'Moved all documentation from old .dartdoc files.' (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC { 7 $(ANNOTATIONS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
8 factory $CLASSNAME() => _$(CLASSNAME)FactoryProvider.createDocumentFragment(); 8 factory $CLASSNAME() => _$(CLASSNAME)FactoryProvider.createDocumentFragment();
9 9
10 factory $CLASSNAME.html(String html) => 10 factory $CLASSNAME.html(String html) =>
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 this.nodes.clear(); 52 this.nodes.clear();
53 53
54 final e = new Element.tag("div"); 54 final e = new Element.tag("div");
55 e.innerHtml = value; 55 e.innerHtml = value;
56 56
57 // Copy list first since we don't want liveness during iteration. 57 // Copy list first since we don't want liveness during iteration.
58 List nodes = new List.from(e.nodes); 58 List nodes = new List.from(e.nodes);
59 this.nodes.addAll(nodes); 59 this.nodes.addAll(nodes);
60 } 60 }
61 61
62 /**
63 * Adds the specified element after the last child of this
64 * document fragment.
65 */
62 void append(Element element) { 66 void append(Element element) {
63 this.children.add(element); 67 this.children.add(element);
64 } 68 }
65 69
70 /**
71 * Adds the specified text as a text node after the last child of this
72 * document fragment.
73 */
66 void appendText(String text) { 74 void appendText(String text) {
67 this.nodes.add(new Text(text)); 75 this.nodes.add(new Text(text));
68 } 76 }
69 77
78
79 /**
80 * Parses the specified text as HTML and adds the resulting node after the
81 * last child of this document fragment.
82 */
70 void appendHtml(String text) { 83 void appendHtml(String text) {
71 this.nodes.add(new DocumentFragment.html(text)); 84 this.nodes.add(new DocumentFragment.html(text));
72 } 85 }
73 86
74 $!MEMBERS 87 $!MEMBERS
75 } 88 }
OLDNEW
« no previous file with comments | « tools/dom/templates/html/dart2js/impl_MouseEvent.darttemplate ('k') | tools/dom/templates/html/impl/impl_Storage.darttemplate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698