- From: Joe Pea <notifications@github.com>
- Date: Sat, 15 Sep 2018 00:04:27 -0700
- To: w3c/webcomponents <webcomponents@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Saturday, 15 September 2018 07:04:49 UTC
> can we realize APIs which are available only for custom element authors Do you mean, can we allow the mixins to be used only with Element classes? If so, then yeah we can: The mixin could check the base class to make sure it is an Element class, f.e., pseudo code of the native code in JS: ```js function withSomeFeature(Base = HTMLElement) { if (!extends from(Base, Element)) throw new TypeError('mixin can only be used on classes extending Element') // continue, return class extends Base... } ``` Or did you mean something else? -- 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-421536878
Received on Saturday, 15 September 2018 07:04:49 UTC