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

@WebReflection 

> ```html
> <any-element mixins="behavior1 behavior2" />
> ```

I think I prefer

```html
<any-element components="behavior1 behavior2" />
```

or


```html
<any-element behaviors="behavior1 behavior2" />
```

or


```html
<any-element has="behavior1 behavior2" />
```

because these aren't _exactly_ mixins as I described in my last comment, although there's room for conflict when/if multiple components/behaviors modify the same properties on the target element, which makes them only _similar_ to mixins.

> it would put an end to the is confusion and story, it can be easily polyfilled too.

Yeah! And more robust and flexible too, because behaviors could be added or removed independently of the original element.  f.e., If the app starts with

```html
<any-element has="behavior1 behavior2" />
```

then at any point later in runtime, some other developer could augment the element with further behavior as needed, and convert it to


```html
<any-element has="behavior1 behavior2 behavior3" />
```

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

Received on Thursday, 7 September 2017 19:57:32 UTC