This described in detail in the documentation.
Properties and methods are defined on the element's prototype
using the Polymer()
constructor.
Polymer('my-element', {
name: 'Mohsen',
isChecked: false,
isCheckedChanged: function() {
console.log('I am checked?', this.isChecked);
},
...
});
To define a property as boolean, make sure to hint its type.
Use <prop>Changed
watchers to be notified when the <prop>
changes.