<dom-module id="seed-element">
<template>
<style>
:host {
display: block;
box-sizing: border-box;
}
</style>
<content></content>
<p class="author">
<img src="{{author.image}}">
Cheers, {{author.name}}!
</p>
</template>
</dom-module>
<script>
Polymer({
is: 'seed-element',
properties: {
fancy: Boolean,
author: {
type: Object,
value: function() {
return {
name: 'Dimitri Glazkov',
image: 'http://addyosmani.com/blog/wp-content/uploads/2013/04/unicorn.jpg',
};
}
},
},
// Element Lifecycle
ready: function() {
// `ready` is called after all elements have been configured, but
// propagates bottom-up. This element's children are ready, but parents
// are not.
},
attached: function() {
// `attached` fires once the element and its parents have been inserted
// into a document.
},
detached: function() {
// The analog to `attached`, `detached` fires when the element has been
// removed from a document.
},
// Element Behavior
sayHello: function(greeting) {
var response = greeting || 'Hello World!';
return 'seed-element says, ' + response;
}
});
</script>