-
Notifications
You must be signed in to change notification settings - Fork 16
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
Alternatives for communication for broader support #38
Comments
@Nolanus Just copied this into a new issue. I don't know if it's necessary to do this, if Edge and IE11 indeed work. |
Hi, thanks for the suggestions. However, the BroadcastChannel looks promising and could reduce this libraries size and complexity. I'll keep this ticket open for future research and checks when the number of supported browsers increases (namely Edge and Safari). |
I think using the BroadcastChannel might be a lot faster too, since you don't need to poll anymore. |
Hi, i really like this library and i would really love it implemented with the Broadcast Channel API. Do you have any progress? Thanks much. |
@simoneP93 I don't think anyone did anything concrete for this. At this moment, my use case doesn't really need it, so I won't get any time to work on it at my work. If you'd like you could try it and create a PR. |
I've read something about other techniques to do cross-window communication. Something like this. Using a method like that would eliminate the need for polling, theoretically making the communication quicker. I have never used it though. Also, I don't know about browser support and I think 3/4 of the library would have to be rewritten.
This person had the same problem and they recommend using a BroadcastChannel. It's a simple API:
Problem is, Edge doesn't support it yet, so it's of no use for this issue. I did find a polyfill that could maybe work. It uses local storage though, so I don't know if that will work.
[edit] There's another BroadcastChannel 'polyfill' right here. This one chooses the best mode of communication based on the browser it's running on. Works on Edge, FireFox, Chrome, Opera, but it doesn't seem to work on IE11 (which I would abandon altogether). Maybe this would be a better method than pure localStorage? It's pretty damn quick.
The text was updated successfully, but these errors were encountered: