Index: tools/dom/templates/html/impl/impl_HTMLTemplateElement.darttemplate |
diff --git a/tools/dom/templates/html/impl/impl_HTMLTemplateElement.darttemplate b/tools/dom/templates/html/impl/impl_HTMLTemplateElement.darttemplate |
index e311e3e614c2cfe9836612e375cee2ebef49bc97..f54aef75aebcd70f0b83185cb0831d67b68dbcab 100644 |
--- a/tools/dom/templates/html/impl/impl_HTMLTemplateElement.darttemplate |
+++ b/tools/dom/templates/html/impl/impl_HTMLTemplateElement.darttemplate |
@@ -289,4 +289,20 @@ option[template] { |
}'''; |
document.head.append(style); |
} |
+ |
+ /** |
+ * An override to place the contents into content rather than as child nodes. |
+ * |
+ * See also: |
+ * |
+ * * <https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/templates/index.html#innerhtml-on-templates> |
+ */ |
+ void setInnerHtml(String html, |
+ {NodeValidator validator, NodeTreeSanitizer treeSanitizer}) { |
+ text = null; |
+ var fragment = createFragment( |
+ html, validator: validator, treeSanitizer: treeSanitizer); |
+ |
+ content.append(fragment); |
+ } |
} |