Cross-boundary communication between desktop and web
Source: Dev.to
Demo
- Repo (reference implementation):
- Live demo:
Incremental Delivery via Explicit Boundaries
A pragmatic way to do incremental delivery is to introduce new modules behind explicit boundaries:
- Embed legacy / new pieces via iframe.
- Split experiences into separate windows when the host is desktop (or when multi‑monitor workflows help).
- Use Web Components to build reusable UI pieces without betting on a single framework.
The next question becomes: how do those pieces communicate so interactions (drag & drop, keyboard copy/paste) still work across boundaries? And how does it bridge to the desktop host?
Architecture Overview
+------------------------ Desktop host (WebView2) ------------------------+
| WebMessageReceived- WebView2 security:
- Frames in WebView2:
- Demo repository: