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

Unified Diff: tools/dom/templates/html/impl/impl_Text.darttemplate

Issue 2422293002: Minor tweaks to dart:html for better dart2js codegen (Closed)
Patch Set: Created 4 years, 2 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
« no previous file with comments | « tools/dom/templates/html/impl/impl_Comment.darttemplate ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/dom/templates/html/impl/impl_Text.darttemplate
diff --git a/tools/dom/templates/html/impl/impl_Text.darttemplate b/tools/dom/templates/html/impl/impl_Text.darttemplate
index 8c530587802ab44536d2bac2c7d7e3eaa6b857d6..a459077069765d1210c0a196303db9b8c9595553 100644
--- a/tools/dom/templates/html/impl/impl_Text.darttemplate
+++ b/tools/dom/templates/html/impl/impl_Text.darttemplate
@@ -7,6 +7,12 @@
part of $LIBRARYNAME;
$(ANNOTATIONS)$(NATIVESPEC)$(CLASS_MODIFIERS)class $CLASSNAME$EXTENDS$IMPLEMENTS {
+$if DART2JS
+ factory $CLASSNAME(String data) =>
+ JS('returns:Text;depends:none;effects:none;new:true',
+ '#.createTextNode(#)', document, data);
+$else
factory $CLASSNAME(String data) => document._createTextNode(data);
+$endif
$!MEMBERS
}
« no previous file with comments | « tools/dom/templates/html/impl/impl_Comment.darttemplate ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698