mirror of
https://github.com/flutter/flutter
synced 2024-08-27 03:50:33 +00:00
Docs: Update radio.sky to use the specced API for shadow roots
Review URL: https://codereview.chromium.org/692563003
This commit is contained in:
parent
3f008050a2
commit
5482eece0f
|
@ -14,7 +14,7 @@ SKY MODULE - radio button and radio button group
|
|||
module.exports.RadioElement = sky.registerElement('radio', class extends Element {
|
||||
constructor () {
|
||||
this.addEventListener('click', (event) => this.checked = true);
|
||||
this.createShadowTree().appendChild(module.document.findId('radio-shadow').content.cloneNode(true));
|
||||
this.addShadowRoot(new sky.ShadowRoot(module.document.findId('radio-shadow').content.cloneNode(true)));
|
||||
}
|
||||
get checked () {
|
||||
return this.hasAttribute('checked');
|
||||
|
@ -48,7 +48,7 @@ SKY MODULE - radio button and radio button group
|
|||
<script>
|
||||
module.exports.RadioGroupElement = sky.registerElement('radiogroup', class extends Element {
|
||||
constructor () {
|
||||
this.createShadowTree().appendChild(module.document.findId('radiogroup-shadow').cloneNode(true));
|
||||
this.addShadowRoot(new sky.ShadowRoot(module.document.findId('radiogroup-shadow').content.cloneNode(true)));
|
||||
}
|
||||
get value () {
|
||||
let children = this.getChildNodes();
|
||||
|
|
Loading…
Reference in a new issue