January 2026
Use the Broadcast Channel API to Communicate Between Windows
I'm building a Magic: The Gathering Deck Builderdb that uses two windows. I'm sending messages between them with the Broadcast Channel interface. It looks like this:
HTML
Message Sync
Output
JavaScript
window. =
Notes
- Open one or more additional copies of this window. You can type into and one of them and all of them will update.
-
I'm using bitty in this example since that's what I work with. Extracting the
this.#channellines and connecting them with a new event listener for the input gets things to work without it.
end of line
Footnotes
Currently in prototype, the deck builder will be here.