mirror of
https://github.com/Polymer/polymer.git
synced 2026-08-19 01:14:44 -05:00
Ensure template helpers in trusted templates work.
This commit is contained in:
@@ -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 || {});
|
||||
|
||||
Reference in New Issue
Block a user