Installation
@almighty-shogun/webkit-native-bridge ships as ESM and depends only on @almighty-shogun/utils for shared utility types, which it uses at type level only. 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 } 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.