vercel

bidc

Bidirectional Channels for JavaScript

by vercel

TypeScript

TypeScript99%
CSS0.8%
JavaScript0.2%

Commit activity

Last 12 weeks · 0 commits

Full graph →

Community health

1 of 6 standards met

Community profile →
37
✓README○License○Contributing○Code of Conduct○Issue Template○PR Template

Recent PRs & issues

Quiet · 1 in progress · Last activity 10mo ago
See all on GitHub →
kapeka0

accepts any incoming message as long as the matches — it never checks where the message came from. Since the default is and any window with a handle to the target (opener, parent, named frame) can to it, a malicious window that knows or guesses the can complete the handshake and hijack a legitimate channel, intercepting all subsequent communication. A possible fix is to add an optional argument to . When provided: Inbound: connections whose differs from the declared origin are rejected in . Outbound: the origin is used as the for instead of , so handshake messages aren't broadcast to other origins. The expected origin has to be declared by the caller — it can't be derived from a cross-origin target ( throws a ), and deriving it from the first handshake (trust-on-first-use) is a race an attacker can win, so it wouldn't actually be safe. Fully backward compatible: without origin, behaviour is identical to before.

kapeka0 · 3mo ago
proudparrot2

Can I use this to communicate with a service worker from the main thread? If so, how?

proudparrot2 · 1y ago
weizman

visit example.com, open devtools, paste and run - demo works Such an html file in the project, set up GitHub pages, and you get a playground for playing with this without having to load/install anything locally, could be useful

weizman · 1y ago
haingdc
fix a typoMergedPR

Hi, I see a tiny typo when I read code. It would be great if it could be corrected. Thank you

haingdc · 1y ago
Structured data for AI agents

Repository: vercel/bidc. Description: Bidirectional Channels for JavaScript Stars: 1284, Forks: 24. Primary language: TypeScript. Languages: TypeScript (99%), CSS (0.8%), JavaScript (0.2%). Topics: async, channels, iframe, javascript, messaging, rpc, worker. Latest release: 0.0.4 (10mo ago). Open PRs: 1, open issues: 4. Last activity: 10mo ago. Community health: 37%. Top contributors: shuding, haingdc, Rich-Harris.