Hi,
I am having a question about Boolean property value. As the doc says Boolean properties are set based on the presence of the attribute: if the attribute exists at all, the property is set to true, regardless of the attribute value. If the attribute is absent, the property gets its default value.
Here is my experiment. my-element want to use a collapseOpened property to bind to it's local DOM iron-collapse's property 'opened'.
<iron-collapse opened="{{collapseOpened}}">
some texts
</iron-collapse>
<script>
Polymer({
is: 'my-element',
properties: {
collapseOpened: {
type: Boolean,
value: false,
}
},
});
</script>
Since in the 'opened' attribute is present in iron-collapse, should it be true? But in fact, the iron-collapse is not expanded, which indicates the value is false.
Any ideas?