public
Last active

Polymer ceci example

  • Download Gist
polymer-example.html
HTML
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
<polymer-element name="ceci-button" attributes="label"
extends="ceci-element" label="Click Me">
<template>
<style>
:host {
display: block;
width: 100%;
}
</style>
<button id="button" on-click="{{onClick}}">
{{label}}
</button>
</template>
<script>
Polymer('ceci-example', {
ready: function () {
this.super();
},
onClick: function () {
this.broadcast('click');
},
ceci: {
defaultBroadcasts: ['click'],
broadcasts: {
click: 'Fired when button is clicked.'
},
listeners: {
setLabel: 'Set Label'
},
editable: {
'label': {
type: "text",
description: "Text shown on the button.",
name: 'Label'
},
}
}
});
</script>
</polymer-element>

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.