![PyPI Now Supports iOS and Android Wheels for Mobile Python Development](https://cdn.sanity.io/images/cgdhsj6q/production/96416c872705517a6a65ad9646ce3e7caef623a0-1024x1024.webp?w=400&fit=max&auto=format)
Security News
PyPI Now Supports iOS and Android Wheels for Mobile Python Development
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
channel-rpc
Advanced tools
[![GitHub License](https://img.shields.io/badge/license-MIT-brightgreen.svg)](https://github.com/yourusername/channel-rpc/blob/main/LICENSE)
Channel-rpc is a TypeScript library that simplifies communication between different windows or iframes using the Channel Messaging API and JSON-RPC. This library is designed to make inter-window communication a breeze, ensuring that only windows with matching channelId
can exchange data.
WIP
channelId
.To get started with channel-rpc
, you can install it via npm:
npm install channel-rpc
import { ChannelServer } from "channel-rpc";
// Define your message handlers
const handler = {
add: (a: number, b: number): number => a + b,
};
// Create a ChannelServer instance
const server = new ChannelServer({
channelId: "channel-1", // Must match the channelId in the child window
source: window, // Source window for listening to handshake messages
handler: handler, // Your message handler
});
export type HandlerType = typeof handler;
import { ChannelClient } from "channel-rpc";
import type { HandlerType } from "./main.ts";
// Create a ChannelClient instance
const client = new ChannelClient<HandlerType>({
target: window.top,
channel: "channel-1", // Must match the channelId in the main window
});
// Use the stub to call methods on the main window
const result = await client.stub.add(2, 3); // result === 5
ChannelServer
channelId
(string): A unique identifier for the channel.source
(Window): The source window to listen for handshake messages.handler
(object): The message handler object.ChannelClient
target
(Window): The target window for communication.channel
(string): The channel identifier to match with the main window.This project is licensed under the MIT License. See the LICENSE file for details.
If you encounter any issues or have questions, please open an issue. We're here to help!
Check out the Release Notes for information on the latest updates and features.
Give channel-rpc
a try, and simplify your inter-window communication in web applications. We look forward to your feedback and contributions!
FAQs
JSON-RPC over postMessage
The npm package channel-rpc receives a total of 0 weekly downloads. As such, channel-rpc popularity was classified as not popular.
We found that channel-rpc demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.