| OLD | NEW |
| 1 <!-- | 1 <!-- |
| 2 // Copyright 2014 The Chromium Authors. All rights reserved. | 2 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 3 // Use of this source code is governed by a BSD-style license that can be | 3 // Use of this source code is governed by a BSD-style license that can be |
| 4 // found in the LICENSE file. | 4 // found in the LICENSE file. |
| 5 --> | 5 --> |
| 6 <sky> | 6 <sky> |
| 7 <import src="/sky/framework/sky-box/sky-box.sky"/> | 7 <import src="/sky/framework/sky-box/sky-box.sky"/> |
| 8 <import src="/sky/framework/sky-button/sky-button.sky"/> | 8 <import src="/sky/framework/sky-button/sky-button.sky"/> |
| 9 <import src="/sky/framework/sky-checkbox/sky-checkbox.sky"/> | 9 <import src="/sky/framework/sky-checkbox/sky-checkbox.sky"/> |
| 10 <import src="/sky/framework/sky-element/sky-element.sky" as="SkyElement"/> | 10 <import src="/sky/framework/sky-element/sky-element.sky" as="SkyElement"/> |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 <sky-box title='Group Two'> | 49 <sky-box title='Group Two'> |
| 50 <div><sky-radio group='bar'/>A</div> | 50 <div><sky-radio group='bar'/>A</div> |
| 51 <div><sky-radio group='bar'/>B</div> | 51 <div><sky-radio group='bar'/>B</div> |
| 52 <div><sky-radio group='bar' selected='true' />C</div> | 52 <div><sky-radio group='bar' selected='true' />C</div> |
| 53 </sky-box> | 53 </sky-box> |
| 54 </sky-box> | 54 </sky-box> |
| 55 | 55 |
| 56 </template> | 56 </template> |
| 57 <script> | 57 <script> |
| 58 module.exports = class extends SkyElement { | 58 module.exports = class extends SkyElement { |
| 59 created() { |
| 60 this.myButton = null; |
| 61 this.myCheckbox = null; |
| 62 this.myText = null; |
| 63 this.clickCount = 0; |
| 64 } |
| 59 attached() { | 65 attached() { |
| 60 this.myButton = this.shadowRoot.getElementById('button'); | 66 this.myButton = this.shadowRoot.getElementById('button'); |
| 61 this.myCheckbox = this.shadowRoot.getElementById('checkbox'); | 67 this.myCheckbox = this.shadowRoot.getElementById('checkbox'); |
| 62 this.myText = this.shadowRoot.getElementById('text'); | 68 this.myText = this.shadowRoot.getElementById('text'); |
| 63 this.clickCount = 0; | 69 this.clickCount = 0; |
| 64 } | 70 } |
| 65 handleClick(event) { | 71 handleClick(event) { |
| 66 this.clickCount++; | 72 this.clickCount++; |
| 67 this.myText.value = "Moar clicking " + this.clickCount; | 73 this.myText.value = "Moar clicking " + this.clickCount; |
| 68 } | 74 } |
| 69 }.register(); | 75 }.register(); |
| 70 </script> | 76 </script> |
| 71 </sky-element> | 77 </sky-element> |
| 72 | 78 |
| 73 <widget-root /> | 79 <widget-root /> |
| 74 </sky> | 80 </sky> |
| OLD | NEW |