Cross-tab Sync with BroadcastChannel

The PAN bus mirrors a subset of topics to BroadcastChannel('pan') so every tab receives the same retained state. Publish from one tab, observe instantly in another.

mirror: settings.* retained snapshots multi-tab sync

Mirrored Clock

Last message on settings.clock is retained and replayed to new tabs.
status: waiting…
--:--:--
Open this demo in a new tab to watch the clock stay in sync.

How it works

  1. The bus declares mirror="settings.*", forwarding matching messages to the pan BroadcastChannel.
  2. Each tab publishes settings.clock every second with retain: true.
  3. New tabs subscribe and receive the retained value immediately, then stay in sync via mirror posts.