diff --git a/lib/elements/dom-bind.html b/lib/elements/dom-bind.html index 4b128b86..67bbf92a 100644 --- a/lib/elements/dom-bind.html +++ b/lib/elements/dom-bind.html @@ -57,6 +57,9 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN constructor() { super(); + if (Polymer.strictTemplatePolicy) { + throw new Error(`strictTemplatePolicy: dom-bind not allowed`); + } this.root = null; this.$ = null; this.__children = null; diff --git a/lib/elements/dom-if.html b/lib/elements/dom-if.html index dc41e243..87b8b627 100644 --- a/lib/elements/dom-if.html +++ b/lib/elements/dom-if.html @@ -255,8 +255,12 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN if (c$ && c$.length) { // use first child parent, for case when dom-if may have been detached let parent = c$[0].parentNode; - for (let i=0, n; (i can only be templatized once'); diff --git a/test/runner.html b/test/runner.html index cde4c190..78b551fa 100644 --- a/test/runner.html +++ b/test/runner.html @@ -45,6 +45,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN 'unit/custom-style-async.html', 'unit/custom-style-scope-cache.html', 'unit/events.html', + 'unit/strict-template-policy.html', 'unit/template-whitespace.html', 'unit/resolveurl.html', 'unit/case-map.html', diff --git a/test/unit/behaviors.html b/test/unit/behaviors.html index 34d94097..98cf74dd 100644 --- a/test/unit/behaviors.html +++ b/test/unit/behaviors.html @@ -22,6 +22,12 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN + + + + @@ -309,6 +366,37 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN + + + + + + + + + + + + + + + + + + + + + diff --git a/test/unit/strict-template-policy.html b/test/unit/strict-template-policy.html new file mode 100644 index 00000000..8596bda4 --- /dev/null +++ b/test/unit/strict-template-policy.html @@ -0,0 +1,359 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + \ No newline at end of file