Get startedPropertiesEventsEventsStylingPluginsConfigurationAdditionalGuides & tipsContributingChangelog
Events
One thing is providing the Web Component with data through properties - but we also want the Web Component to be able to fire events that we can listen to.
In order to dispatch events that can be listened to from the Web Component, use the EventContext
.
For example - if you want to dispatch a custom event 'my-event' that is triggered onClick, all you have to do is:
Now you can add a listener when you consume the component:
→ Styling