kitbagjs / events

A lightweight event bus written in Typescript
MIT License
15 stars 0 forks source link

Add support for emitting events via a `BroadcastChannel` #3

Closed pleek91 closed 7 months ago

pleek91 commented 7 months ago

Description

Adds a new option to createEmitter called broadcastChannel. Give it a string value and it will emit all events on that channel. This means that multiple emitters can respond to events emitted from other emitters. This also works across browsing contexts.