happy-opfs
    Preparing search index...

    Namespace SyncChannel

    SyncChannel namespace exports. Provides a clean API for managing sync channel lifecycle.

    import { SyncChannel } from 'happy-opfs';

    // Worker: start listening
    SyncChannel.listen();

    // Main thread: connect to worker
    const result = await SyncChannel.connect(worker);
    result.inspect(sharedBuffer => {
    // Iframe: attach to existing channel
    SyncChannel.attach(sharedBuffer);
    });

    // Check if ready
    if (SyncChannel.isReady()) { ... }

    Functions

    attach
    connect
    isReady
    listen