diff --git a/lib/mixins/element-mixin.js b/lib/mixins/element-mixin.js index 976f18c755..7aeca81e92 100644 --- a/lib/mixins/element-mixin.js +++ b/lib/mixins/element-mixin.js @@ -778,8 +778,18 @@ export const ElementMixin = dedupingMixin(base => { // we don't want to spam existing users who might have adopted the // shorthand when attribute deserialization is not important. if (legacyOptimizations && !(prop in this._properties) && + // Methods used in templates with no dependencies (or only literal + // dependencies) become accessors with template effects; ignore these !(effect.info.part.signature && effect.info.part.signature.static) && - !effect.info.part.hostProp && !templateInfo.nestedTemplate) { + // Bindings added from a host to the template element may also include + // "instance props" introduced into the template scope and not + // actually provided by the host; since we can't disambiguate these, + // ignore them all + !effect.info.part.hostProp && + // Template effects added on TemplateInstance classes can't determine + // whether the property may have been a "static" method, so ignore + // all nested template bindings + !templateInfo.nestedTemplate) { console.warn(`Property '${prop}' used in template but not declared in 'properties'; ` + `attribute will not be observed.`); }