- From: Joe Pea <notifications@github.com>
- Date: Sun, 02 Sep 2018 08:38:51 -0700
- To: w3c/webcomponents <webcomponents@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Sunday, 2 September 2018 15:39:13 UTC
@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