From 7a9d081909007376882f193914772debe5cd93ae Mon Sep 17 00:00:00 2001 From: Kevin Schaaf Date: Wed, 7 Feb 2018 17:50:07 -0800 Subject: [PATCH] Improve comment. --- src/lib/template/templatizer.html | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/lib/template/templatizer.html b/src/lib/template/templatizer.html index bdc8447b6d..36a329afc3 100644 --- a/src/lib/template/templatizer.html +++ b/src/lib/template/templatizer.html @@ -198,8 +198,11 @@ }, _customPrepAnnotations: function(archetype, template) { - // Store a "clone" of the template on the archetype (content has been - // pulled into _content property, so copy that also) + // Store a "clone" of the template on the archetype to ensure no + // references on this template are leaked onto the cached archetype + // Note we don't actually clone the template since it could be + // a type-extension; rather we create a new one and copy the + // `_content` reference holding the prototypical content over var t = archetype._template = document.createElement('template'); var c = t._content = template._content; if (!c._notes) {