Ensure template helpers in trusted templates work.

This commit is contained in:
Kevin Schaaf
2018-07-23 22:43:05 -07:00
parent 275491e05e
commit 2ac221bfe7
2 changed files with 88 additions and 14 deletions
+1 -1
View File
@@ -503,7 +503,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
// Under strictTemplatePolicy, the templatized element must be owned
// by a (trusted) Polymer element, indicated by existence of _methodHost;
// e.g. for dom-if & dom-repeat in main document, _methodHost is null
if (Polymer.strictTemplatePolicy && !owner._methodHost) {
if (Polymer.strictTemplatePolicy && !findMethodHost(template)) {
throw new Error('strictTemplatePolicy: template owner not trusted');
}
options = /** @type {!TemplatizeOptions} */(options || {});