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

FWIW I'd be more than happy to see the following in the future:
https://github.com/w3c/webcomponents/issues/509#issuecomment-281006515

But all cases about graceful enhancement keep being ignored.

Maybe by the time this thread will be resolved all browsers and textual Web surfers on the world will be natively capable of Custom Elements V1 so that graceful enhancement for thi smatter could be abandoned.

```js
customElements.define(
  'my-button',
  class extends HTMLElement implements HTMLButtonBehavior {} // ???
);
```

Once we have these composable behavior I wonder if these can be multiple and/or created upfront.

```js
customElements.defineBehavior(
  'button-like',
  {implements: [
    HTMLFocusBehavior,
    HTMLDataListBehavior,
    HTMLEditableBehavior
  ]}
);

customElements.define(
  'my-button',
  class extends HTMLElement {},
  // ???
  {behavior: 'button-like'}
);
```

Just curious what other developers have in mind for this.

Regards

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

Received on Monday, 20 February 2017 11:49:11 UTC