Re:Exploring the Broadcast Channel API for cross-tab communi...
by genezeta on Friday July 12, 2024 @12:46PM
(#40947197)
This is not the general MDN reference or guides, but MDN's blog, a new thing since about a year or so. It has a bunch of sponsored content which doesn't really care much about quality, sadly.
Re:Exploring the Broadcast Channel API for cross-tab communi...
by captn3m0 on Friday July 12, 2024 @01:39PM
(#40947688)
I had never used the API, and skimmed through the article. Found the first example very intriguing, but couldn’t figure out how it would work across devices.
Thanks for clarifying!
From the "Real-world use cases and examples" section in TFA:
"A user can start reading an article on their desktop and continue seamlessly from the same point on their mobile device"
"In a collaborative text editor, changes made by one user can be broadcast to other users' instances in real-time"
None of that is possible with the BroadcastChannel API as it's only for same-origin communication between contexts (i.e. tabs, frames and windows) in the same browser process.