Back to browse
GitHub Repository

A drop-in coordination wrapper for WebWorkers that keeps exactly one Worker alive across tabs using Web Locks.

8 starsTypeScript

Access OPFS from multiple tabs using a fake Shared Worker

by ch_sm·May 1, 2026·2 points·1 comment

AI Analysis

●●SolidBig BrainWizardry

Enables multi-tab OPFS access by electing a leader tab to own the synchronous worker.

Strengths
  • Solves the specific SharedWorker limitation regarding FileSystemSyncAccessHandle.
  • Implements automatic leader election and MessagePort relaying for followers.
  • Drop-in wrapper preserves standard postMessage interface for existing code.
Weaknesses
  • Follower tabs incur slight latency due to message relaying through the leader.
  • Niche utility limited to developers specifically needing multi-tab OPFS writes.
Target Audience

Frontend developers building offline-first apps with SQLite/WASM

Similar To

wa-sqlite · idb · localforage

Similar Projects