DEV Community

Discussion on: Cross Tab Communication with Javascript

Collapse
 
mvasigh profile image
Mehdi Vasigh • Edited

SharedWorker is not deprecated, right? MDN says nothing about that. It's probably the most well-supported way of doing this although BroadcastChannel has much better DX.

Also the npm package broadcast-channel does this with fallbacks to non-native BroadcastChannel alternatives i.e. localStorage (for IE) and idb.

Collapse
 
vince_tblt profile image
Vincent Thibault

SharedWorker was flagged “removed” from WebKit spec and IE didn’t plan to implement it.
The main reason for the dismiss is the ServiceWorker API that appeared soon after and can handle all the SharedWorker API.

Thread Thread
 
mvasigh profile image
Mehdi Vasigh

Ah I see, TIL. Thanks!