- From: Joe Pea <notifications@github.com>
- Date: Sun, 02 Sep 2018 09:26:49 -0700
- To: w3c/webcomponents <webcomponents@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Sunday, 2 September 2018 16:27:10 UTC
Here's an example use case:
Suppose an element wants to observe children. It could be opt-in with a mixin:
```js
const {withChildren} = customElements.elementFeatures
class MyEl extends withChildren( HTMLElement ) {
// this callback is provided by the `withChildren` mixin
childrenChangedCallback() {
// work with children here, don't worry about if children exist in `connectedCallback`.
// Also children here are guaranteed to be already upgrade if they are custom
}
}
```
--
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-417942419
Received on Sunday, 2 September 2018 16:27:10 UTC