DEV Community

Discussion on: Missing the Message Bus in HTML Custom Elements (and Micro-Frontends in General)

Collapse
 
ronnewcomb profile image
Ron Newcomb

Um, how to explain this? The event attributes like onClick or onMyCustomEvent don't "belong" to the components on which they appear.

doesn't "own" or "implement" an onClick attribute; likewise doesn't hardcode anything about onDrilldown or any other event. Don't confuse the component's invocation with its definition.

I don't understand your comment about queryselectorall. Custom Events work like built-in event regarding it. What of it?