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

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

Issue 14812016: expose MDV addBindings (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 7 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_Element.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_HTMLTemplateElement.darttemplate
diff --git a/tools/dom/templates/html/impl/impl_HTMLTemplateElement.darttemplate b/tools/dom/templates/html/impl/impl_HTMLTemplateElement.darttemplate
index deb69d8182528e72a9b1347055fed7ac03a7de3c..42f8d389ab6daaf84730535076f2af80862dfa6e 100644
--- a/tools/dom/templates/html/impl/impl_HTMLTemplateElement.darttemplate
+++ b/tools/dom/templates/html/impl/impl_HTMLTemplateElement.darttemplate
@@ -86,6 +86,22 @@ $!MEMBERS
_Bindings._bootstrapTemplatesRecursivelyFrom(content);
}
+ /**
+ * Binds all mustaches recursively starting from the [root] node.
+ *
+ * Note: this is not an official Model-Driven-Views API; it is intended to
+ * support binding the [ShadowRoot]'s content to a model.
+ */
+ // TODO(jmesserly): this is needed to avoid two <template> nodes when using
+ // bindings in a custom element's template. See also:
+ // https://github.com/polymer-project/polymer/blob/master/src/bindMDV.js#L68
+ // Called from:
+ // https://github.com/polymer-project/polymer/blob/master/src/register.js#L99
+ @Experimental
+ static void bindModel(Node root, model, [CustomBindingSyntax syntax]) {
+ _Bindings._addBindings(root, model, syntax);
+ }
+
static bool _initStyles;
static void _injectStylesheet() {
« no previous file with comments | « tools/dom/templates/html/impl/impl_Element.darttemplate ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698