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

Unified Diff: sdk/lib/html/dartium/html_dartium.dart

Side-by-side diff isn't available for this file because of its large size.
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:
Download patch
Index: sdk/lib/html/dartium/html_dartium.dart
diff --git a/sdk/lib/html/dartium/html_dartium.dart b/sdk/lib/html/dartium/html_dartium.dart
index fb5f63a09b54670174a2d34eb79ffb8d71c9dae4..d039ca665cd32cde5b46fdc9e00332d57fd28927 100644
--- a/sdk/lib/html/dartium/html_dartium.dart
+++ b/sdk/lib/html/dartium/html_dartium.dart
@@ -8854,11 +8854,15 @@ class DocumentFragment extends Node {
this._insertAdjacentNode(where, new DocumentFragment.html(text));
}
- void addText(String text) {
+ void append(Element element) {
+ this.children.add(element);
+ }
+
+ void appendText(String text) {
this.insertAdjacentText('beforeend', text);
}
- void addHtml(String text) {
+ void appendHtml(String text) {
this.insertAdjacentHTML('beforeend', text);
}
@@ -9708,9 +9712,16 @@ abstract class Element extends Node implements ElementTraversal {
}
/**
+ * 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);
}
@@ -9718,7 +9729,7 @@ abstract class Element extends Node implements ElementTraversal {
* 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/dart2js/html_dart2js.dart ('k') | sdk/lib/html/templates/html/impl/impl_DocumentFragment.darttemplate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698