From e0cf310371b05436ed0704d4b8f98f5c64ee7b46 Mon Sep 17 00:00:00 2001 From: Steve Orvell Date: Fri, 11 Apr 2014 14:23:37 -0700 Subject: [PATCH] ensure we have a bindingDelegate in instanceTemplate. --- src/instance/mdv.js | 6 ++++-- src/polymer-body.html | 1 - 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/instance/mdv.js b/src/instance/mdv.js index e703d79..2bafec1 100644 --- a/src/instance/mdv.js +++ b/src/instance/mdv.js @@ -11,9 +11,11 @@ // element api supporting mdv var mdv = { - //syntax: syntax, instanceTemplate: function(template) { - var dom = template.createInstance(this, this.syntax); + // ensure a default bindingDelegate + var syntax = this.syntax || (!template.bindingDelegate && + this.element.syntax); + var dom = template.createInstance(this, syntax); this.registerObservers(dom.bindings_); return dom; }, diff --git a/src/polymer-body.html b/src/polymer-body.html index 44f8aeb..1f06c64 100644 --- a/src/polymer-body.html +++ b/src/polymer-body.html @@ -62,7 +62,6 @@ modelName: 'model', ready: function() { - this.syntax = this.element.syntax; this.template = document.querySelector('template'); var model = window[this.modelName]; if (model) {