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

feat: add multi-tab state change notifications #566

Merged
merged 2 commits into from
Feb 2, 2023

Conversation

hf
Copy link
Contributor

@hf hf commented Dec 22, 2022

Uses the BroadcastChannel API to register a new broadcast channel (using the storageKey option as the channel's name) which will broadcast state change events from the originating tab to all other open tabs.

This is only available when a browser environment is detected and session persistence is enabled. Environments that are not browsers or browsers without session persistence are not able to use this feature since they have no way of synchronizing the underlying session storage.

@hf hf requested review from kangmingtay, alaister and J0 and removed request for kangmingtay and alaister December 22, 2022 15:41
Copy link
Member

@alaister alaister left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Very cool!

@kangmingtay
Copy link
Member

So this should help resolve the issue where a PASSWORD_RECOVERY event emitted in one tab will be sent to all other tabs as well right?

@hf hf force-pushed the hf/add-multi-tab-notifications branch from cabbc40 to 94d1e84 Compare January 23, 2023 10:45
@hf hf merged commit 0b6c5db into master Feb 2, 2023
@hf hf deleted the hf/add-multi-tab-notifications branch February 2, 2023 10:32
@github-actions
Copy link
Contributor

github-actions bot commented Feb 2, 2023

🎉 This PR is included in version 2.11.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants