Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(33)

Side by Side Diff: sky/examples/radio.sky

Issue 730223002: Specs: default exports to {} rather than document, since it makes writing modules saner (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « sky/examples/htmlish/framework/element.sky ('k') | sky/specs/apis.md » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 SKY MODULE - radio button and radio button group 1 SKY MODULE - radio button and radio button group
2 <!-- accessibility handling not implemented yet, pending mojo service --> 2 <!-- accessibility handling not implemented yet, pending mojo service -->
3 3
4 <script>
5 module.exports = {};
6 </script>
7
8 <!-- <radio> --> 4 <!-- <radio> -->
9 <template id="radio-shadow"> 5 <template id="radio-shadow">
10 <style> 6 <style>
11 :host { width: 1em; height: 1em; border: solid; background: white; } 7 :host { width: 1em; height: 1em; border: solid; background: white; }
12 :host[checked] { background: black; } 8 :host[checked] { background: black; }
13 </style> 9 </style>
14 </template> 10 </template>
15 <script> 11 <script>
16 module.exports.RadioElement = module.registerElement({ 12 module.exports.RadioElement = module.registerElement({
17 tagName: 'radio', 13 tagName: 'radio',
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 throw; 77 throw;
82 let children = this.getChildNodes(); 78 let children = this.getChildNodes();
83 for (let child of children) 79 for (let child of children)
84 if (child instanceof module.exports.RadioElement) 80 if (child instanceof module.exports.RadioElement)
85 if (child != radio) 81 if (child != radio)
86 child.checked = false; 82 child.checked = false;
87 } 83 }
88 }, 84 },
89 }); 85 });
90 </script> 86 </script>
OLDNEW
« no previous file with comments | « sky/examples/htmlish/framework/element.sky ('k') | sky/specs/apis.md » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698