Tabs of one origin share no JavaScript objects, so they coordinate through the browser:
BroadcastChannel is a named pub/sub bus. new BroadcastChannel('auth') in each tab, postMessage(data) in one, a message event in all the others. Data is structured-cloned, like postMessage() to a worker. It reaches every other channel object with that name in the same origin, including workers and a second channel object in the sending tab; only the object that sent it is skipped. Matching uses the storage key, so a third-party iframe only reaches copies of itself embedded under the same top-level site.
SharedWorker is one worker shared by every same-origin page that creates it with the same URL and name. Each page talks to it through its own MessagePort (worker.port), and the worker gets a connect event per page. Use it for shared state or one shared connection, such as a single WebSocket for all tabs. It runs while any page is connected. Chrome Android shipped it only in Chrome 148.
Web Locks coordinate rather than message. navigator.locks.request('sync', async (lock) => {…}) runs the callback once no other tab or worker of the origin holds 'sync', and releases the lock when the returned promise settles or the tab closes. { ifAvailable: true } gives null instead of waiting; { steal: true } takes the lock and rejects the holder's request with AbortError; mode: 'shared' allows several readers.
Others: the storage event fires in other tabs when localStorage changes; window.opener and iframes can postMessage each other directly; a service worker can message every client with clients.matchAll().
Pick by need: notifications → BroadcastChannel; one owner of a resource → a lock, or a SharedWorker where supported.