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

Get access to other tabs #7

Closed
letos07 opened this issue May 11, 2015 · 4 comments
Closed

Get access to other tabs #7

letos07 opened this issue May 11, 2015 · 4 comments

Comments

@letos07
Copy link

letos07 commented May 11, 2015

Hey!

Please help me, I am using you code for SignalR application. It resolve the problem with multiple tabs, but If event was fired I see it in all tabs. How I can get access to others tab without connection id? I need can show data only if that tab that I wont.

@slimjack
Copy link
Owner

You think that propagation of events to all tabs is wrong? Why? By design clients work with IWC-SignalR like with usual SignalR. So, events should be raised even if this is not a connection owner.

To communicate between tabs you can use EventBus or SharedData. To distinguish tabs you can use windowIds from WindowMonitor.

@letos07
Copy link
Author

letos07 commented May 14, 2015

Its doesnt wrong, but I need to show notification only in that browser tab from that I send my request to server.

@slimjack
Copy link
Owner

You can mark message with windowId (server in this case should respond with this windowId too) and then filter messages by windowId.

@letos07
Copy link
Author

letos07 commented May 17, 2015

ok, thanks. Only one question: how I can get signalR connectionId from other tabs?
SJ.iwc.SignalR.getConnectionOwnerWindowId() - return only windowId, not connection? maybe you store this value?

slimjack added a commit that referenced this issue May 24, 2015
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