diff --git a/lib/mixins/property-effects.js b/lib/mixins/property-effects.js index cbe721a3..c6ccb291 100644 --- a/lib/mixins/property-effects.js +++ b/lib/mixins/property-effects.js @@ -2390,8 +2390,14 @@ export const PropertyEffects = dedupingMixin(superClass => { * @protected */ static _addTemplatePropertyEffect(templateInfo, prop, effect) { + // `dynamicFns` is the flattened property list, so we can use that to + // detect non-declared properties. Properties must be listed in + // `properties` to be included in `observedAttributes` since CE V1 + // reads that at registration time, and we want to keep template parsing + // lazy if (legacyOptimizations && !(prop in templateInfo.dynamicFns)) { - console.warn(`Property '${prop}' used in template but not declared in 'properties'.`); + console.warn(`Property '${prop}' used in template but not declared in 'properties'; ` + + `attribute will not be observed.`); } let hostProps = templateInfo.hostProps = templateInfo.hostProps || {}; hostProps[prop] = true;