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

@Zambonifofex to be honest, I agree with you, the extend way is clunky right now, but apparently the best we have so fare.

For instance, I do believe custom built-ins should be extensible just by class
```js
class MyButton extends HTMLButtonElement {}
```
why would anyone need to further explicitly say `extends: "button"` is out of my understanding.

However, like I've said before, the whole Web platform is full of shenanigans, yet we are here today in all its glorious success!

## yet another use case for `is`
After building [Mozilla positron](https://github.com/mozilla/positron), and reading their most basic example:
![screenshot from 2016-11-19 20-57-58](https://cloud.githubusercontent.com/assets/85749/20458557/57e72492-aea0-11e6-90f9-a01a1b76cb6f.png)

I've realized the awkward usage of a well known bad practice as `document.write` is could also be gracefully enhanced for every user and browser, in a backward compatible way, with or without JS, through custom built-ins:

![screenshot from 2016-11-19 21-18-33](https://cloud.githubusercontent.com/assets/85749/20458566/9346aa6c-aea0-11e6-9bd1-20c6b713f0ae.png)

TL;DR there are 90% of benefits having the `is` mechanism, and 10% of vendors problems figuring out how to implement it as right as possible, but not perfectly, since we all know it's not.

-- 
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-261741425

Received on Saturday, 19 November 2016 21:40:41 UTC