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

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

Issue 19663011: Custom Syntax's are now enabled via template.bindingDelegate = (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: restore @Experimental Created 7 years, 5 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: tools/dom/templates/html/impl/impl_Element.darttemplate
diff --git a/tools/dom/templates/html/impl/impl_Element.darttemplate b/tools/dom/templates/html/impl/impl_Element.darttemplate
index 305d5f2af341c748ea9f57842856cecff93c9be6..821a9f49e2ee7641f61a1a8bd0631e74f5f212c8 100644
--- a/tools/dom/templates/html/impl/impl_Element.darttemplate
+++ b/tools/dom/templates/html/impl/impl_Element.darttemplate
@@ -862,13 +862,15 @@ $endif
}
/**
- * Creates an instance of the template.
+ * Creates an instance of the template, using the provided model and binding
+ * delegate.
+ *
* This is only supported if [isTemplate] is true.
*/
@Experimental()
- DocumentFragment createInstance(model, String syntax) {
+ DocumentFragment createInstance(model, BindingDelegate delegate) {
_ensureTemplate();
- return TemplateElement.mdvPackage(this).createInstance(model, syntax);
+ return TemplateElement.mdvPackage(this).createInstance(model, delegate);
}
/**
@@ -884,6 +886,22 @@ $endif
TemplateElement.mdvPackage(this).model = value;
}
+ /**
+ * The binding delegate which is inherited through the tree. It can be used
+ * to configure custom syntax for `{{bindings}}` inside this template.
+ *
+ * This is only supported if [isTemplate] is true.
+ */
+ @Experimental()
+ BindingDelegate get bindingDelegate =>
+ TemplateElement.mdvPackage(this).bindingDelegate;
+
+ @Experimental()
+ void set bindingDelegate(BindingDelegate value) {
+ _ensureTemplate();
+ TemplateElement.mdvPackage(this).bindingDelegate = value;
+ }
+
// TODO(jmesserly): const set would be better
static const _TABLE_TAGS = const {
'caption': null,
« no previous file with comments | « sdk/lib/html/dartium/html_dartium.dart ('k') | tools/dom/templates/html/impl/impl_HTMLTemplateElement.darttemplate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698