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

Unified Diff: lib/dom/templates/html/impl/impl_DocumentFragment.darttemplate

Issue 10854208: Adding Element.AddHTML and Element.addText methods. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Incorporating review feedback Created 8 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: lib/dom/templates/html/impl/impl_DocumentFragment.darttemplate
diff --git a/lib/dom/templates/html/impl/impl_DocumentFragment.darttemplate b/lib/dom/templates/html/impl/impl_DocumentFragment.darttemplate
index 643e1b10d1e99580ee639f31eb455fed5cafa243..264184ae883a19f115386e7a97691a86de3c0c4a 100644
--- a/lib/dom/templates/html/impl/impl_DocumentFragment.darttemplate
+++ b/lib/dom/templates/html/impl/impl_DocumentFragment.darttemplate
@@ -197,6 +197,14 @@ class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
this._insertAdjacentNode(where, new DocumentFragment.html(text));
}
+ void addText(String text) {
+ this.insertAdjacentText('beforeend', text);
+ }
+
+ void addHTML(String text) {
+ this.insertAdjacentHTML('beforeend', text);
+ }
+
Future<ElementRect> get rect() {
return _createMeasurementFuture(() => const EmptyElementRect(),
new Completer<ElementRect>());
« no previous file with comments | « no previous file | lib/dom/templates/html/impl/impl_Element.darttemplate » ('j') | tests/html/element_add_test.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698