happy-opfs
    Preparing search index...

    Function listen

    • Starts listening for sync channel requests in a Web Worker. Waits for a SharedArrayBuffer from the main thread and begins processing requests.

      Returns VoidIOResult

      A VoidIOResult indicating success or failure.

      1.1.0

      // In worker.js
      import { SyncChannel } from 'happy-opfs';
      const result = SyncChannel.listen();
      if (result.isErr()) {
      console.error('Failed to start listening:', result.unwrapErr());
      }