# broadcast-channel

> A BroadcastChannel that works in New Browsers, Old Browsers, WebWorkers, NodeJs, Deno and iframes

Latest version **7.4.0** (published 2026-08-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install broadcast-channel
pnpm add broadcast-channel
yarn add broadcast-channel
bun add broadcast-channel
```

## Health

**Score 70/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; recently updated; high maintenance score; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 7.4.0 |
| Published | 2026-08-03 |
| First published | 2016-08-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 4 |
| Unpacked size | 527.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | pubkey |
| Maintainers | pubkey |
| Keywords | broadcast-channel, broadcastchannel, broadcast, polyfill, shim, events, localstorage, indexeddb, postMessage, crosstab, ipc, leader-election, queue, inter-process |

## Links

- npm: https://www.npmjs.com/package/broadcast-channel
- Repository: https://github.com/pubkey/broadcast-channel
- Homepage: https://pubkey.github.io/broadcast-channel/
- Issues: https://github.com/pubkey/broadcast-channel/issues
- Funding: https://github.com/sponsors/pubkey
- npm.io page: https://npm.io/package/broadcast-channel

## Dependencies (4)

- [unload](https://npm.io/package/unload.md) 2.4.1
- [p-queue](https://npm.io/package/p-queue.md) 6.6.2
- [oblivious-set](https://npm.io/package/oblivious-set.md) 2.0.0
- [@babel/runtime](https://npm.io/package/@babel/runtime.md) 7.29.7

## Alternatives

- [cron](https://npm.io/package/cron.md) — 4.9M weekly downloads
- [@vercel/queue](https://npm.io/package/@vercel/queue.md) — 731.6K weekly downloads
- [create-sonicjs](https://npm.io/package/create-sonicjs.md) — 1.6K weekly downloads
- [@exellix/jobs-api](https://npm.io/package/@exellix/jobs-api.md) — 941 weekly downloads
- [@forwardimpact/libskill](https://npm.io/package/@forwardimpact/libskill.md) — 575 weekly downloads

## Recent versions

- 7.4.0 (latest) — 2026-08-03
- 7.3.0 — 2026-01-20
- 7.2.0 — 2025-10-27
- 7.1.0 — 2025-03-25
- 7.0.0 — 2023-11-27
- 6.0.0 — 2023-10-30
- 5.5.1 — 2023-10-23
- 5.5.0 — 2023-10-16
- 5.4.0 — 2023-10-10
- 5.3.0 — 2023-08-18
- 5.2.0 — 2023-08-10
- 5.1.0 — 2023-04-25
- 5.0.3 — 2023-03-23
- 5.0.2 — 2023-03-23
- 5.0.1 — 2023-03-23
- … 87 more at https://npm.io/package/broadcast-channel/versions

## README

<!--
    This is a different REDME file which will be published to npm
    The one for GitHub is in .github directory.

    @link https://stackoverflow.com/a/65676410/3443137

    The problem was that google indexed the npm-site instead of the github site
-->

<p align="center">
  <a href="https://github.com/pubkey/broadcast-channel">
    <img src="./docs/files/icon.png" width="150px" />
  </a>
</p>

<h1 align="center">BroadcastChannel</h1>
<p align="center">
  <strong>A BroadcastChannel that works in old browsers, new browsers, WebWorkers and NodeJs and Deno</strong>
  <br/>
  <span>+ LeaderElection over the channels</span>
</p>

<p align="center">
    <a href="https://twitter.com/pubkeypubkey">
        <img src="https://img.shields.io/twitter/follow/pubkeypubkey.svg?style=social&logo=twitter"
            alt="follow on Twitter" />
    </a>
</p>

![demo.gif](docs/files/demo.gif)

* * *

A BroadcastChannel that allows you to send data between different browser-tabs or nodejs-processes.
And a LeaderElection over the channels.

# [Read the full documentation on github](https://github.com/pubkey/broadcast-channel)


# Sponsored by

<p align="center">
    <a href="https://rxdb.info/?utm_source=github&utm_medium=repo&utm_campaign=github-broadcast-channel-npm">
        <img
            src="https://rxdb.info/files/logo/logo_text.svg"
            alt="JavaScript Database"
            width="300"
         />
         <br />
         <br />
         <span>The <b>JavaScript Database</b></span>
    </a>
</p>

---
_Source: https://npm.io/package/broadcast-channel · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
