You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Polymer 1.x, any property bound in the template was automatically added to the list of attributes that are deserialized to properties.
In Polymer 2.x this changed, such that only properties declared in properties are added to observedAttributes and deserialized. This is because template parsing is lazy (deferred to first element instance) while observedAttributes must be present at registration time. That said, properties are used in templates still get setters and work as normal in terms of dynamic updates based on property changes; they just do not have corresponding observed attributes.
Since this is a silent difference between Polymer 1.x and 2.x, we propose adding a warning to the legacyOptimizations flag mode (to err on the conservative side, since users may have taken advantage of the terseness of not declaring properties and may not consider it a "bug" per se).
Versions
Polymer: v2.x and 3.x
The text was updated successfully, but these errors were encountered:
Description
In Polymer 1.x, any property bound in the template was automatically added to the list of attributes that are deserialized to properties.
In Polymer 2.x this changed, such that only properties declared in
properties
are added toobservedAttributes
and deserialized. This is because template parsing is lazy (deferred to first element instance) whileobservedAttributes
must be present at registration time. That said, properties are used in templates still get setters and work as normal in terms of dynamic updates based on property changes; they just do not have corresponding observed attributes.Since this is a silent difference between Polymer 1.x and 2.x, we propose adding a warning to the
legacyOptimizations
flag mode (to err on the conservative side, since users may have taken advantage of the terseness of not declaring properties and may not consider it a "bug" per se).Versions
The text was updated successfully, but these errors were encountered: