Callbacks On Web Components? | CSS-Tricks
Briefly

Custom events offer an effective way for developers to extend the functionality of their code, allowing for more responsive and flexible interactions compared to traditional callback functions.
Unlike conventional JavaScript libraries where callbacks are passed during instantiation, Web Components self-instantiate, making direct callback implementation cumbersome, thus increasing the need for custom events.
Read at CSS-Tricks
[
]
[
|
]