Re: [w3c/webcomponents] How to define APIs only for custom element authors (#758)

@tkent-google 

> because we assume a single ElementInternals instance handles all features for the associated element?

That's what I was trying to avoid with my, because then it means `ElementInternals` will include all possible features, even if they are not used.

So in **Option 5** above, class-factory mixins provide a way to use specific features:

```js
import UserFeature from 'npm-package'
const {BuiltinFeature1, BuiltinFeature2} = customElements.elementFeatures

class MyEl extends BuiltinFeature1( BuiltinFeature2( UserFeature( HTMLElement ) ) ) {
  // ...
}

customElements.define('my-el', MyEl)
```

Then this way the class will have only the features it has specified.

-- 
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/758#issuecomment-417939344

Received on Sunday, 2 September 2018 15:39:13 UTC