preactjs / preact-custom-element

Wrap your component up as a custom element
MIT License
360 stars 52 forks source link

Feature: adding ability to emit custom events #54

Open bsparks opened 4 years ago

bsparks commented 4 years ago

this will allow via configuration the addition of custom events that can be fired outside of the Preact world and consumed by the host page. they include a callback in the event payload in case you want async events (like if you let the host page take care of server calls by request from the component)

jaydeep987 commented 3 years ago

this is must have feature. I wonder why is this not merged even after almost a year?

havran commented 2 years ago

Hi, any further work here? This seems like something which should works, when we want use addEventListener and listen events emited inside custom element. Thanks.