From 61f4494e255e5c29a2ba8db67716988aad1dc1a2 Mon Sep 17 00:00:00 2001 From: Hixie Date: Tue, 4 Nov 2014 12:16:49 -0800 Subject: [PATCH] Specs: define registerElement() a little differently, so that the code that uses it looks nicer; this moves the complexity to places that register elements without using 'class' (e.g. the internals of frameworks that create elements for defining elements) Review URL: https://codereview.chromium.org/699083005 --- examples/radio.sky | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/radio.sky b/examples/radio.sky index 6cafa7199c0..b5b139bb730 100644 --- a/examples/radio.sky +++ b/examples/radio.sky @@ -16,7 +16,7 @@ SKY MODULE - radio button and radio button group module.exports.RadioElement = module.registerElement({ tagName: 'radio', shadow: true, - prototype: (class extends Element { + constructor: class extends Element { constructor (module) { super(module); this.addEventListener('click', (event) => this.checked = true); @@ -42,7 +42,7 @@ SKY MODULE - radio button and radio button group if (this.parentNode instanceof module.exports.RadioGroupElement) this.parentNode.setChecked(this); } - }).prototype, + }, }); @@ -53,10 +53,10 @@ SKY MODULE - radio button and radio button group