Drawing Across Browser Tabs with JavaScript, Canvas and BroadcastChannel
A few days ago I wrote about using the JavaScript BroadcastChannel API to keep multiple browser tabs synchronized. The basic idea is surprisingly simple: pages from the same origin can create a channel with the same name and exchange messages directly in the browser. There is no WebSocket connection, no polling loop and no server involved. This time I wanted to turn that concept into something more visual. Instead of synchronizing a text field or a counter, I built a small experiment where you can draw in one browser tab and see the same drawing appear immediately in another tab . The result is a cross-tab neon drawing canvas built with: HTML Canvas Pointer Events BroadcastChannel requestAnimationFrame plain JavaScript No framework and no external library are required. The complete experiment is available on CodePen: Draw Across Browser Tabs ✦ Open the Pen in two browser tabs and start drawing in one of them. The second tab should foll...