What problem does it solve?
Utilities for browser extensions aim to reduce the complexity of building robust, cross-context functionality by providing ready-made components for inter-context RPC, type-safe messaging, URL pattern matching, test-friendly fake browser APIs, job scheduling, and shadow DOM isolation.
Core Features & Use Cases
- Cross-context RPC via proxy-service to call background implementations from popup/content/scripts
- Type-safe messaging with defineExtensionMessaging and defineWindowMessaging
- URL pattern matching utilities using MatchPattern
- In-memory fake browser API for unit tests to simulate browser APIs
- Background job scheduling with defineJobScheduler
- Shadow DOM isolation containers for content-script UIs via createIsolatedElement
- Optional storage wrappers with type safety
Quick Start
Install the core utilities in your extension and start by exposing a background service with registerService, then call it from a popup or content script using createProxyService.