Skip to content

Commit cb72d75

Browse files
committed
template: insert content before firstChild; this prevents textNodes from invalidating annotations.
1 parent 0aa4bbe commit cb72d75

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

components/polymer/src/features/template.html

+1-3
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,12 @@
1919
},
2020

2121
_stampTemplate: function(template, target) {
22-
// TODO(sorvell): light dom children will invalidate annotations.
23-
// TODO(sjmiles): ^ why?
2422
var instance = this.instanceTemplate(template);
2523
// identify host
2624
for (var e = instance.firstElementChild; e; e=e.nextElementSibling) {
2725
e.host = this;
2826
}
29-
target.insertBefore(instance, target.firstElementChild);
27+
target.insertBefore(instance, target.firstChild);
3028
},
3129

3230
instanceTemplate: function(template) {

0 commit comments

Comments
 (0)