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

Database changes do not arrive in another window #21

Open
kabalage opened this issue Jun 9, 2016 · 2 comments
Open

Database changes do not arrive in another window #21

kabalage opened this issue Jun 9, 2016 · 2 comments

Comments

@kabalage
Copy link

kabalage commented Jun 9, 2016

Example:
https://jsbin.com/gefurupogi/1/edit?html,js,console,output

  1. Open the example twice
  2. Click buttons
  3. Watch for changes in the console

Without worker-pouch the change is received in both windows.
With worker-pouch the change is received in only the window where the db.post() call happens.

@nolanlawson
Copy link
Member

nolanlawson commented Jun 12, 2016

Yep, this bug occurs because there's no way to communicate across the worker boundary. Luckily there are efforts to get change observers into IndexedDB, which would solve this problem.

Unfortunately it may be some time before this gets into browsers, meaning until then you'll have to manually do postMessage() and/or use SharedWorkers in order to get change events firing consistently in all tabs/workers.

@kabalage
Copy link
Author

Thank you, I will look into the workarounds then.

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

2 participants