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

[storage] The messageSync is not syncing between multiple browser tabs on different paths #703

Open
zobweyt opened this issue Sep 30, 2024 · 0 comments

Comments

@zobweyt
Copy link

zobweyt commented Sep 30, 2024

Describe The Problem To Be Solved

Currently, the url of postMessage argument is manually set to location.href in the code:

channel.postMessage(
{ key, newValue, timeStamp: +new Date(), url: location.href },
location.origin,
),

This means that synchronization is only available for tabs that are on the same path. If the tabs are on different paths, synchronization will not occur. However, synchronization will resume if the tabs navigate back to the same path and a message is posted.

Suggest A Solution

  • Allow customizing the postMessage's url argument for the messageSync.
  • Remove this argument in the code so synchronization is available for all paths by default.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant