five-bells-visualization
Version:
Tool to visualize Five Bells payments
117 lines (78 loc) • 1.85 kB
HTML
<!--
@license
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
-->
<script>
Polymer.BehaviorA = {
properties: {
label: {
type: String,
observer: '_labelChanged'
}
},
listeners: {
change: '_changeHandler'
},
ready: function() {
this.__readyA = true;
},
_labelChanged: function(label) {
this.__label = label;
},
_changeHandler: function(e) {
this.__change = e.detail.value;
}
}
</script>
<script>
Polymer.BehaviorB = {
properties: {
disabled: {
type: Boolean,
value: false,
observer: '_disabledChanged'
}
},
_disabledChanged: function(disabled) {
this.__disabled = disabled
},
ready: function() {
this.__readyB = true;
}
}
</script>
<dom-module id="single-behavior">
<script>
Polymer({
behaviors: [
Polymer.BehaviorA
]
});
</script>
</dom-module>
<dom-module id="multi-behaviors">
<script>
Polymer({
behaviors: [
Polymer.BehaviorA,
Polymer.BehaviorB
],
properties: {
foo: {
type: String,
reflectToAttribute: true,
readOnly: true,
observer: '_fooChanged'
}
},
_fooChanged: function(foo) {
this.__foo = foo;
}
});
</script>
</dom-module>