| Index: sky/examples/radio.sky
|
| diff --git a/sky/examples/radio.sky b/sky/examples/radio.sky
|
| index 6c6d29f777856b8b73b42ce86906b9a1473b6b57..02c1f6a28e108a8d3b23b37f911560941f9abc84 100644
|
| --- a/sky/examples/radio.sky
|
| +++ b/sky/examples/radio.sky
|
| @@ -9,10 +9,10 @@ SKY MODULE - radio button and radio button group
|
| </style>
|
| </template>
|
| <script>
|
| - module.exports.RadioElement = module.registerElement({
|
| - tagName: 'radio',
|
| - shadow: true,
|
| - constructor: class extends Element {
|
| + module.exports.RadioElement = module.registerElement(
|
| + class extends Element {
|
| + static get tagName() { return 'radio'; }
|
| + static get shadow() { return true; }
|
| constructor (module) {
|
| super(module);
|
| this.addEventListener('click', (event) => this.checked = true);
|
| @@ -38,8 +38,8 @@ SKY MODULE - radio button and radio button group
|
| if (this.parentNode instanceof module.exports.RadioGroupElement)
|
| this.parentNode.setChecked(this);
|
| }
|
| - },
|
| - });
|
| + }
|
| + );
|
| </script>
|
|
|
| <!-- <radiogroup> -->
|
| @@ -49,10 +49,10 @@ SKY MODULE - radio button and radio button group
|
| </style>
|
| </template>
|
| <script>
|
| - module.exports.RadioGroupElement = module.registerElement{
|
| - tagName: 'radiogroup',
|
| - shadow: true,
|
| - constructor: (class extends Element {
|
| + module.exports.RadioGroupElement = module.registerElement(
|
| + class extends Element {
|
| + static get tagName() { return 'radiogroup'; }
|
| + static get shadow() { return true; }
|
| constructor (module) {
|
| super(module);
|
| this.shadowRoot.append(module.document.findId('radiogroup-shadow').content.cloneNode(true));
|
| @@ -81,6 +81,6 @@ SKY MODULE - radio button and radio button group
|
| if (child != radio)
|
| child.checked = false;
|
| }
|
| - },
|
| - });
|
| + }
|
| + );
|
| </script>
|
|
|