Skip to content

Commit

Permalink
Clarify warning. Add comment.
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinpschaaf committed Feb 1, 2019
1 parent 35c48d8 commit 9dea1f7
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/mixins/property-effects.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 9dea1f7

Please sign in to comment.