Skip to content

Commit

Permalink
Add comments on warning limitations.
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinpschaaf committed Feb 20, 2019
1 parent 2874c86 commit 940d1a7
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion lib/mixins/element-mixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.`);
}
Expand Down

0 comments on commit 940d1a7

Please sign in to comment.