[w3c/webcomponents] Why must the is="" attribute exist? (#509)

The [spec](https://w3c.github.io/webcomponents/spec/custom/#custom-elements-customized-builtin-example) says:

> Trying to use a customized built-in element as an autonomous custom element will not work; that is, `<plastic-button>Click me?</plastic-button>` will simply create an `HTMLElement` with no special behaviour.

But, in my mind, that's just what the *spec says*, but not that it has to be that way. Why has it been decided for it to be that way?

I believe that we can specify this type of information in the `customElement.define()` call rather than in the markup. For example, that very same document shows this example:

```js
customElements.define("plastic-button", PlasticButton, { extends: "button" });
```

Obviously, `plastic-button` extends `button` as defined right there in that call to `define()`. So why bother with the `is=""` attribute? I think the following HTML is much nicer:

```html
<plastic-button>Click me</plastic-button>
```

and that the necessary info for the HTML engine to upgrade that element properly is right there, in `{ extends: "button" }`. I do believe there's some way to make this work (as there always is with software, because we make it, it is ours, we make software do what we want it to do), and that `is=""` is not required and can be completely removed from the spec.

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

Received on Tuesday, 31 May 2016 19:06:59 UTC