Commit 4f47cb92 authored by Hixie's avatar Hixie

Docs: call superclass constructors in radio.sky example

Review URL: https://codereview.chromium.org/689763003
parent 5482eece
......@@ -13,6 +13,7 @@ SKY MODULE - radio button and radio button group
module.exports = {};
module.exports.RadioElement = sky.registerElement('radio', class extends Element {
constructor () {
super();
this.addEventListener('click', (event) => this.checked = true);
this.addShadowRoot(new sky.ShadowRoot(module.document.findId('radio-shadow').content.cloneNode(true)));
}
......@@ -48,6 +49,7 @@ SKY MODULE - radio button and radio button group
<script>
module.exports.RadioGroupElement = sky.registerElement('radiogroup', class extends Element {
constructor () {
super();
this.addShadowRoot(new sky.ShadowRoot(module.document.findId('radiogroup-shadow').content.cloneNode(true)));
}
get value () {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment