BroadcastChannel
BroadcastChannel to send data between different browser-tabs or nodejs
...The library works completely client-side and offline in supported browser use cases. It is tested across old browsers, modern browsers, Web Workers, iframes, and Node.js. It also includes leader election over channels, which helps multiple contexts decide which one should perform a shared task. It is useful for multi-tab synchronization, offline-first applications, shared state coordination, and browser apps that need to avoid duplicated background work.