Skip to content

Commit

Permalink
Fix polyfill templates
Browse files Browse the repository at this point in the history
Handle cases when elements register before templates are bootstrapped

Fixes Polymer/vulcanize#209
  • Loading branch information
dfreedm committed Aug 5, 2015
1 parent 7c3e516 commit d78c934
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/mini/template.html
Expand Up @@ -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() {
Expand Down Expand Up @@ -60,4 +66,4 @@

});

</script>
</script>

0 comments on commit d78c934

Please sign in to comment.