diff --git a/src/instance/mdv.js b/src/instance/mdv.js index f742bec..0eb6840 100644 --- a/src/instance/mdv.js +++ b/src/instance/mdv.js @@ -16,6 +16,8 @@ // element api supporting mdv var mdv = { instanceTemplate: function(template) { + // ensure template is decorated (lets' things like work) + HTMLTemplateElement.decorate(template); // ensure a default bindingDelegate var syntax = this.syntax || (!template.bindingDelegate && this.element.syntax); diff --git a/test/html/template-attr-template-import.html b/test/html/template-attr-template-import.html new file mode 100644 index 0000000..f43bfdf --- /dev/null +++ b/test/html/template-attr-template-import.html @@ -0,0 +1,19 @@ + + + + \ No newline at end of file diff --git a/test/html/template-attr-template.html b/test/html/template-attr-template.html new file mode 100644 index 0000000..57e9bff --- /dev/null +++ b/test/html/template-attr-template.html @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + +
+ + + + diff --git a/test/js/bindMDV.js b/test/js/bindMDV.js index 6457582..54a87b6 100644 --- a/test/js/bindMDV.js +++ b/test/js/bindMDV.js @@ -59,6 +59,7 @@ suite('bindMDV', function() { htmlSuite('bind', function() { htmlTest('html/template-distribute-dynamic.html'); + htmlTest('html/template-attr-template.html'); htmlTest('html/bind.html'); htmlTest('html/unbind.html'); htmlTest('html/prop-attr-bind-reflection.html');