mirror of
https://github.com/Polymer/polymer.git
synced 2025-02-25 18:55:30 -06:00
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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user