Removing support for returning strings from template getter.

(Per previous documented deprecation: https://www.polymer-project.org/2.0/docs/devguide/dom-template#templateobject)
This commit is contained in:
Kevin Schaaf
2018-05-08 12:29:01 -07:00
parent bd05abf9aa
commit ba4491d558
5 changed files with 12 additions and 14 deletions

View File

@@ -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);
}