Skip to content

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-bridge
sh
npm install @almighty-shogun/webkit-native-bridge
sh
pnpm add @almighty-shogun/webkit-native-bridge
sh
yarn add @almighty-shogun/webkit-native-bridge

Importing

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 window object for runtime bridge communication.

All packages are released under the MIT License.