Re: [w3c/webcomponents] The is="" attribute is confusing? Maybe we should encourage only ES6 class-based extension. (#509)

If we keep it on merit of understandable syntax, then why not do it similarly to JavaScript?

```js
class Foo extends Bar { ... }
customElements.define('foo-element', Foo)

function New(base) {
  return class New extends base { ... }
}
customElements.define('new-element', New)
```

would be the same as

```html
<new-element extends="foo-element" ...>
  ...
</new-element>
```

where foo-element's constructor will be passed into new-element's mixin. Maybe learning classical programming in HTML would be easier this way.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/webcomponents/issues/509#issuecomment-264719673

Received on Sunday, 4 December 2016 18:06:47 UTC