From ba4491d5588e2e93095db3c05dbaa4610d051987 Mon Sep 17 00:00:00 2001 From: Kevin Schaaf Date: Tue, 8 May 2018 12:29:01 -0700 Subject: [PATCH] Removing support for returning strings from template getter. (Per previous documented deprecation: https://www.polymer-project.org/2.0/docs/devguide/dom-template#templateobject) --- lib/mixins/element-mixin.js | 5 ++--- test/smoke/ordering-test.html | 6 +++--- test/unit/dom-repeat-elements.js | 5 ++--- test/unit/polymer.element.html | 6 +++--- test/unit/styling-scoped.html | 4 ++-- 5 files changed, 12 insertions(+), 14 deletions(-) diff --git a/lib/mixins/element-mixin.js b/lib/mixins/element-mixin.js index 33773f9f03..a445edaf97 100644 --- a/lib/mixins/element-mixin.js +++ b/lib/mixins/element-mixin.js @@ -300,9 +300,8 @@ export const ElementMixin = dedupingMixin(base => { let template = /** @type {PolymerElementConstructor} */ (this).template; if (template) { if (typeof template === 'string') { - let t = document.createElement('template'); - t.innerHTML = template; - template = t; + console.error('template getter must return HTMLTemplateElement'); + template = null; } else { template = template.cloneNode(true); } diff --git a/test/smoke/ordering-test.html b/test/smoke/ordering-test.html index b4c7831837..7e8a3c1160 100644 --- a/test/smoke/ordering-test.html +++ b/test/smoke/ordering-test.html @@ -18,10 +18,10 @@