Commit 956d7b3e authored by Hixie's avatar Hixie

Specs: make element registrations be per-module, define how they are

exported and reexported, rename 'interface' to 'class' in the IDL, add
constructors to all registered elements

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/695043002
parent fe0d6c74
SKY MODULE - radio button and radio button group SKY MODULE - radio button and radio button group
<!-- accessibility handling not implemented yet, pending mojo service --> <!-- accessibility handling not implemented yet, pending mojo service -->
<import src="sky:core" as="sky"/>
<script>
module.exports = {};
</script>
<!-- <radio> --> <!-- <radio> -->
<template id="radio-shadow"> <template id="radio-shadow">
...@@ -10,8 +13,7 @@ SKY MODULE - radio button and radio button group ...@@ -10,8 +13,7 @@ SKY MODULE - radio button and radio button group
</style> </style>
</template> </template>
<script> <script>
module.exports = {}; module.exports.RadioElement = module.registerElement({
module.exports.RadioElement = sky.registerElement({
tagName: 'radio', tagName: 'radio',
shadow: true, shadow: true,
prototype: class extends Element { prototype: class extends Element {
...@@ -51,7 +53,7 @@ SKY MODULE - radio button and radio button group ...@@ -51,7 +53,7 @@ SKY MODULE - radio button and radio button group
</style> </style>
</template> </template>
<script> <script>
module.exports.RadioGroupElement = sky.registerElement({ module.exports.RadioGroupElement = module.registerElement({
tagName: 'radiogroup', tagName: 'radiogroup',
shadow: true, shadow: true,
prototype: class extends Element { prototype: class extends Element {
......
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