tejacques / crosstab

A utility library for cross-tab communication using localStorage.
Apache License 2.0
364 stars 58 forks source link

Broadcast Channel API #74

Open asms opened 5 years ago

asms commented 5 years ago

The broadcast channel API does exactly what crosstab does, but better: https://developer.mozilla.org/en-US/docs/Web/API/Broadcast_Channel_API

AmarildoK commented 4 years ago

It has a 76% global coverage. https://caniuse.com/#search=BroadcastChannel

asms commented 4 years ago

I'm sorry. My original comment was quite short.

Crosstab was created back in 2014 when the Broadcast Channel API simply did not exist. In the absence of modern web APIs, this project solved the need for communication between browsing contexts. Crosstab would now be better as a polyfill for the Broadcast Channel API for that remaining 24%. The README should be updated to at least mention that a new API exists.

AmarildoK commented 4 years ago

@asms That certainly could be an option but you would have to rewrite the lib. To work like the Broadcast Channel API and there are already Polyfills so I don't really see the need to change this lib