html `
<script>
HTMLImports.whenReady(function () {
Polymer({
is: 'my-life-cycle',
properties: {
arr: {
type: Array,
value() {
return [{
"title": this.localName + '#' + this.id + ' was created',
"description": "Called when the element has been created, but before property values are set and local DOM is initialized. Use for one-time set-up before property values are set."
}];
}
}
},
created() {
let obj = {
"title": this.localName + '#' + this.id + ' was created',
"description": "Called when the element has been created, but before property values are set and local DOM is initialized. Use for one-time set-up before property values are set."
};
},
ready() {
let obj = {
"title": this.localName + '#' + this.id + ' has local DOM initialized',
"description": "Called after property values are set and local DOM is initialized. Use for one-time configuration of your component after local DOM is initialized"
};
this.push('arr', obj);
},
attached() {
let obj = {
"title": this.localName + '#' + this.id + ' was attached',
"description": " Called after the element is attached to the document. Can be called multiple times during the lifetime of an element. The first 'attached' callback is guaranteed not to fire until after 'ready'."
};
this.push('arr', obj);
},
detached() {
let obj = {
"title": this.localName + '#' + this.id + ' was detached',
"description": "Called after the element is detached from the document. Can be called multiple times during the lifetime of an element."
};
this.push('arr', obj);
},
attributeChanged(name, type) {
let obj = {
"title": this.localName + '#' + this.id + ' attribute ' + name + ' was changed to ' + this.getAttribute(name),
"description": "Called when one of the element's attributes is changed."
};
this.push('arr', obj);
}
});
})
</script>
`