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

Unified Diff: sdk/lib/html/templates/html/impl/impl_Element.darttemplate

Issue 11316121: Changes to make it easier to add elements. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: sdk/lib/html/templates/html/impl/impl_Element.darttemplate
diff --git a/sdk/lib/html/templates/html/impl/impl_Element.darttemplate b/sdk/lib/html/templates/html/impl/impl_Element.darttemplate
index d475ddfc6e313c3ca491175cb02f49070014e9e9..ae3f16db2855d0c696235d7d8178dca0598112a6 100644
--- a/sdk/lib/html/templates/html/impl/impl_Element.darttemplate
+++ b/sdk/lib/html/templates/html/impl/impl_Element.darttemplate
@@ -592,9 +592,16 @@ abstract class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
}
/**
+ * Adds the specified element to after the last child of this.
+ */
+ void append(Element e) {
+ this.children.add(e);
+ }
+
+ /**
* Adds the specified text as a text node after the last child of this.
*/
- void addText(String text) {
+ void appendText(String text) {
this.insertAdjacentText('beforeend', text);
}
@@ -602,7 +609,7 @@ abstract class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
* Parses the specified text as HTML and adds the resulting node after the
* last child of this.
*/
- void addHtml(String text) {
+ void appendHtml(String text) {
this.insertAdjacentHTML('beforeend', text);
}
« no previous file with comments | « sdk/lib/html/templates/html/impl/impl_DocumentFragment.darttemplate ('k') | tests/html/element_add_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698