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

Here's what [Vue does](https://vuejs.org/v2/guide/components.html#DOM-Template-Parsing-Caveats), it lets you write things like

```html
<table>
  <tr is="my-row"></tr>
</table>
```

But what is important to note here is that the `my-row` Vue component DOES NOT extend from `tr`'s interface/class.

What is happening here (and which is a very good example) is that there are now **_two_** behaviors associated with the `<tr>` element:

1. The behaviors defined by HTMLTableRowElement
2. The behaviors defined by the Vue `my-row` component

This is in contrast to the `is=""` attribute of some of the current native implementations (and aligned with my [above idea](https://github.com/w3c/webcomponents/issues/509#issuecomment-325606505)): the Vue version of `is=""` allows an **_additional_** behavior to be added to the target element, rather than extending the target elements' interface/class.

So, I've made a new issue for the of adding multiple behaviors (rather than limiting ourselves to extending only once from an element's behavior) here: https://github.com/w3c/webcomponents/issues/662

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

Received on Wednesday, 6 September 2017 01:37:23 UTC