Skip to content

Commit

Permalink
template: insert content before firstChild; this prevents textNodes f…
Browse files Browse the repository at this point in the history
…rom invalidating annotations.
  • Loading branch information
sorvell committed Nov 17, 2014
1 parent 0aa4bbe commit cb72d75
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions components/polymer/src/features/template.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,12 @@
},

_stampTemplate: function(template, target) {
// TODO(sorvell): light dom children will invalidate annotations.
// TODO(sjmiles): ^ why?
var instance = this.instanceTemplate(template);
// identify host
for (var e = instance.firstElementChild; e; e=e.nextElementSibling) {
e.host = this;
}
target.insertBefore(instance, target.firstElementChild);
target.insertBefore(instance, target.firstChild);
},

instanceTemplate: function(template) {
Expand Down

0 comments on commit cb72d75

Please sign in to comment.