A TypeScript library for IPC (Inter-Process Communication) between web applications and browser extensions. It provides a native-like calling experience between different contexts.
- Native-like method invocation between different contexts
- Full TypeScript support ensuring type safety
- Promise-based async method call support
- Context-based service registration and invocation
- Simple and easy-to-use API, calling methods just like local ones
npm install web-ipc
class IpcContext {
constructor(public contextId: string = "default") {}
}
function register<T>(interfaceName: string, implementation: T, context: IpcContext): void
const chromeIpcInvoker = new ChromeIpcInvokerFactory();
const proxy = chromeIpcInvoker.createProxy<T>(interfaceName, context)
MIT