Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Event-Bus: Add optional BroadcastChannel polyfill factory #15

Merged
merged 3 commits into from
Nov 21, 2021

Conversation

christoph-fricke
Copy link
Owner

@christoph-fricke christoph-fricke commented Nov 19, 2021

Bring your own polyfill! Adds an optional factory function to the event-bus options, which is used by the
global-broadcast and broadcast strategy to access a BroadcastChannel.
The provided id should be used as a channel name.

If no factory function is provided, the native API will be used when available.
If not available, it falls back to an no-op implementation of BroadcastChannel,
which will continue to deliver messages in the same browser context.

@christoph-fricke christoph-fricke added the enhancement New feature or request label Nov 19, 2021
@floer32
Copy link

floer32 commented Nov 19, 2021

So quick after it came up in chat! Awesome!

@christoph-fricke christoph-fricke merged commit 765ee52 into main Nov 21, 2021
@christoph-fricke christoph-fricke deleted the cfr/bc-poly branch November 21, 2021 11:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants