# @infinex/iframe-ipc

> A simple client / server framework for IPC between an iframe and its parent

Latest version **0.0.1** (published 2023-08-14) · MIT license · 0 weekly downloads

## Install

```sh
npm install @infinex/iframe-ipc
pnpm add @infinex/iframe-ipc
yarn add @infinex/iframe-ipc
bun add @infinex/iframe-ipc
```

## Health

**Score 30/100 (F)** — status: abandoned.

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

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2023-08-14 |
| First published | 2023-08-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 6.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | kyelewis, exogee-kevin |

## Links

- npm: https://www.npmjs.com/package/@infinex/iframe-ipc
- npm.io page: https://npm.io/package/@infinex/iframe-ipc

## Dependencies (1)

- [typescript](https://npm.io/package/typescript.md) 5.1.6

## Recent versions

- 0.0.1 (latest) — 2023-08-14

## README

# @infinex/iframe-ipc

Enable simple IPC between a window and an iframe

## Usage

### iframe

```typescript
import { IFrameIPCChild } from "@infinex/iframe-ipc";

new IFrameIPCChild({
  hello({ name }) => {
    return `Hello, ${name}!`;
  }
});
```

### parent

```typescript
import { IFrameIPCParent } from "@infinex/iframe-ipc";

const iframe = document.querySelector("iframe");
const { call } = new IFrameIPCParent(iframe, "my-website.com:443");

(async () => {
  const result = await call("hello", { name: "friend" });
  console.log(result);
})();
```

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