event-target-shim
event-target-shim copied to clipboard
Support for CustomEvent
As a curiosity, I'd like to experiment with the native variant of an event emitter, as described in
https://medium.com/@zandaqo/eventtarget-the-future-of-javascript-event-systems-205ae32f5e6b and https://css-tricks.com/lets-create-a-lightweight-native-event-bus-in-javascript/
It works in all modern browsers today and Deno - but not Node!
Running new CustomEvent()
results in ReferenceError: CustomEvent is not defined
in the latest version (currently 15.5.1)
I'm not sure if it's in scope for this project to support it, or if a custom-event-shim
is more fitting :thinking:
Thank you for your proposition.
Indeed, sounds good that this package provides CustomEvent
as well.