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 |
} |