Installation
The bridge package ships as ESM and has no runtime dependencies. It is designed for JavaScript running inside a WebKit host that exposes window.webkit.messageHandlers.
Install
sh
bun add @almighty-shogun/webkit-native-bridgesh
npm install @almighty-shogun/webkit-native-bridgesh
pnpm add @almighty-shogun/webkit-native-bridgesh
yarn add @almighty-shogun/webkit-native-bridgeImporting
All public APIs are available from the package root.
ts
import { createNativeBridge, normalizeBridgeResponse } from '@almighty-shogun/webkit-native-bridge'Requirements
- A WebKit host application that registers a message handler.
- Native code that dispatches response events back into the page.
- A browser-like
windowobject for runtime bridge communication.