LEGACY REPO. This repository is for maintenance of the legacy LitElement library. The LitElement base class is now part of the Lit library, which is developed in the lit monorepo.
render() {
return html`
<first-element @my-event=${_=>console.log('event triggered on second component')}>
HELLO WORLD
</first-element>
`
}
Third custom component:
render() {
return html`
<second-element @my-event=${_=>console.log('event triggered on third component')}>
</second-element>
`
}
When I click HELLO WORLD the second element my-event listener is triggered and prints to the console. The third custom component event listener is not triggered.
I would imagine the event would keep bubbling up to the third component?
BTW the click event is propagated all the way to the third component.
First custom component:
Second custom component:
Third custom component:
When I click
HELLO WORLD
the second elementmy-event
listener is triggered and prints to the console. The third custom component event listener is not triggered.I would imagine the event would keep bubbling up to the third component?
BTW the
click
event is propagated all the way to the third component.