Skip to content
Browse files

Fix polyfill templates

Handle cases when elements register before templates are bootstrapped

Fixes Polymer/vulcanize#209
  • Loading branch information...
1 parent 7c3e516 commit d78c93445872e2a5ce3a1b12abe21fd6c532daa8 @azakus azakus committed
Showing with 7 additions and 1 deletion.
  1. +7 −1 src/mini/template.html
View
8 src/mini/template.html
@@ -33,6 +33,12 @@
'must not be a type-extension, found', this._template,
'Move inside simple <template>.'));
}
+ // bootstrap the template if it has not already been
+ if (this._template && !this._template.content && HTMLTemplateElement.bootstrap) {
+ HTMLTemplateElement.decorate(this._template);
+ // recurse if necessary
+ HTMLTemplateElement.bootstrap(this._template.content);
+ }
},
_stampTemplate: function() {
@@ -60,4 +66,4 @@
});
-</script>
+</script>

0 comments on commit d78c934

Please sign in to comment.
Something went wrong with that request. Please try again.