From 7644464cae9536e10fea7098440461c6507d3e1f Mon Sep 17 00:00:00 2001 From: Alexander Marks Date: Fri, 10 Aug 2018 13:14:55 -0700 Subject: [PATCH] Add test for direct assignment to template. --- test/unit/polymer.element.html | 39 ++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/test/unit/polymer.element.html b/test/unit/polymer.element.html index b81d21e090..cfe9d04055 100644 --- a/test/unit/polymer.element.html +++ b/test/unit/polymer.element.html @@ -266,6 +266,26 @@

Sub template

} customElements.define('sub-new-template', SubNewTemplate); + +/** + * Instead of overriding the static getter, this element has its template + * assigned directly to the constructor. + */ +class SubNewTemplateAssigned extends window.MyElement { + static get properties() { + return { + prop2: { + value: 'prop2', + } + }; + } +} + +SubNewTemplateAssigned.template = html` +

Sub template

+
{{prop2}}
`; + +customElements.define('sub-new-template-assigned', SubNewTemplateAssigned);