I'm confused about properties. Is there precise documentation about how
different ways of declaring properties affects the created elements?
If I have this properties block:
properties: {
string1: String,
string2: {
type: String
},
string3:{
type: String,
value: ''
},
string4: {
type: String,
reflectToAttribute: true,
},
string5: {
type: String,
value: '',
reflectToAttribute: true
}
}
It seems an instance of my element will only have one attribute:
<element string5="">.
Furthermore:
element.hasOwnProperty('string1') === false;
element.hasOwnProperty('string2') === false;
element.hasOwnProperty('string3') === true; element.string3 === '';
element.hasOwnProperty('string4') === true; element.string4 === undefined;
element.hasOwnProperty('string5') === true; element.string5 === '';
The behavior of element.string4 is particularly baffling.
Follow Polymer on Google+: plus.google.com/107187849809354688692
---
You received this message because you are subscribed to the Google Groups
"Polymer" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/polymer-dev/aa1f40ef-dadf-4aaf-abbc-e97a5074d5c3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.