Suggested controller: SlotController
Within the community, various teams already have some form of a slot controller to basically abstract the slotchanged/assigned elements logic.
It'd probably be a good idea for us to provide such a controller. It could also act as a base to other slot-based controllers.
basically:
```ts
class SlotController implements ReactiveController {
constructor(
host: ReactiveControllerHost,
slotRef: Ref,
selector?: string
);
}
```
how we pass in a change handler, im not sure yet.
could be a constructor arg, or a method, etc.
关闭于 2023-02-14 0 条评论