iframe-link 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -1
- package/docs/README.ja.md +5 -1
- package/docs/README.zh-CN.md +5 -1
- package/package.json +4 -3
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Simple communication between an iframe and its parent.
|
|
4
4
|
|
|
5
|
-
Promise-based remote calls and
|
|
5
|
+
A minimalist browser library for JavaScript and TypeScript with Promise-based, bidirectional remote procedure calls (RPC) and event messaging over `window.postMessage`.
|
|
6
6
|
|
|
7
7
|
English · [简体中文](docs/README.zh-CN.md) · [日本語](docs/README.ja.md)
|
|
8
8
|
|
|
@@ -12,10 +12,14 @@ English · [简体中文](docs/README.zh-CN.md) · [日本語](docs/README.ja.md
|
|
|
12
12
|
|
|
13
13
|
This SDK turns the parent and iframe into two ends of one small channel: expose methods, await remote calls, emit events, and handle load-order races with a READY/ACK handshake.
|
|
14
14
|
|
|
15
|
+
The design goal is a small API focused on iframe communication, with abstractions and compatibility layers added only for concrete needs.
|
|
16
|
+
|
|
15
17
|

|
|
16
18
|
|
|
17
19
|
## Install
|
|
18
20
|
|
|
21
|
+
Install [`iframe-link`](https://www.npmjs.com/package/iframe-link) from npm:
|
|
22
|
+
|
|
19
23
|
```bash
|
|
20
24
|
pnpm add iframe-link
|
|
21
25
|
# npm install iframe-link
|
package/docs/README.ja.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
iframe と親ページの通信をシンプルに。
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
JavaScript と TypeScript 向けのミニマルなブラウザー通信ライブラリです。`window.postMessage` を使い、Promise ベースの双方向 RPC(リモートプロシージャコール)とイベント通信を提供します。
|
|
6
6
|
|
|
7
7
|
[English](../README.md) · [简体中文](README.zh-CN.md) · 日本語
|
|
8
8
|
|
|
@@ -12,10 +12,14 @@ iframe と親ページの通信をシンプルに。
|
|
|
12
12
|
|
|
13
13
|
この SDK は親ページと iframe を小さな双方向チャネルでつなぎます。メソッドの公開、リモート呼び出し、イベント送信に加え、READY/ACK ハンドシェイクで読み込み順の違いにも対応します。
|
|
14
14
|
|
|
15
|
+
設計の目標は、iframe 通信に集中した小さな API を保ち、明確な必要性がある場合にのみ抽象化や互換レイヤーを導入することです。
|
|
16
|
+
|
|
15
17
|

|
|
16
18
|
|
|
17
19
|
## インストール
|
|
18
20
|
|
|
21
|
+
npm の [`iframe-link`](https://www.npmjs.com/package/iframe-link) をインストールします。
|
|
22
|
+
|
|
19
23
|
```bash
|
|
20
24
|
pnpm add iframe-link
|
|
21
25
|
# npm install iframe-link
|
package/docs/README.zh-CN.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
让 iframe 与父页面之间的通信更简单。
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
面向 JavaScript 和 TypeScript 的极简浏览器通信库,基于 `window.postMessage`,提供 Promise 双向远程过程调用(RPC)与事件通信。
|
|
6
6
|
|
|
7
7
|
[English](../README.md) · 简体中文 · [日本語](README.ja.md)
|
|
8
8
|
|
|
@@ -12,10 +12,14 @@
|
|
|
12
12
|
|
|
13
13
|
这个 SDK 将父页面与 iframe 连接成一个轻量的双向通道:暴露方法、等待远程调用、发送事件,并通过 READY/ACK 握手处理加载顺序差异。
|
|
14
14
|
|
|
15
|
+
设计目标是保持 API 精简、专注于 iframe 通信,只在明确需求出现时引入抽象或兼容层。
|
|
16
|
+
|
|
15
17
|

|
|
16
18
|
|
|
17
19
|
## 安装
|
|
18
20
|
|
|
21
|
+
从 npm 安装 [`iframe-link`](https://www.npmjs.com/package/iframe-link):
|
|
22
|
+
|
|
19
23
|
```bash
|
|
20
24
|
pnpm add iframe-link
|
|
21
25
|
# npm install iframe-link
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "iframe-link",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"description": "Minimalist iframe communication for JavaScript and TypeScript, with Promise-based RPC and events over postMessage.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"iframe",
|
|
7
7
|
"iframe-rpc",
|
|
@@ -11,7 +11,8 @@
|
|
|
11
11
|
"events",
|
|
12
12
|
"cross-origin",
|
|
13
13
|
"handshake",
|
|
14
|
-
"typescript"
|
|
14
|
+
"typescript",
|
|
15
|
+
"minimalist"
|
|
15
16
|
],
|
|
16
17
|
"author": "yuukiLike <YuukiJyoudai@outlook.com>",
|
|
17
18
|
"license": "MIT",
|