Skip to content
@drupflare/spool v1.0.0 GitHub
    Preparing search index...

    Type Alias RegisterOptions

    what register takes

    type RegisterOptions = {
        container?: ServiceWorkerContainer;
        helloTimeoutMs?: number;
        scope?: string;
        storage?: Pick<StorageManager, "persist" | "persisted">;
        target?: Pick<EventTarget, "dispatchEvent">;
        workerUrl?: string;
    }
    Index
    container?: ServiceWorkerContainer

    the container to register on; default navigator.serviceWorker

    helloTimeoutMs?: number

    how long to wait for the worker's answer to the handshake; default 5000

    scope?: string
    storage?: Pick<StorageManager, "persist" | "persisted">

    the storage manager asked for persistence; default navigator.storage

    target?: Pick<EventTarget, "dispatchEvent">

    where spool:cleared and spool:persisted are dispatched; default window

    workerUrl?: string

    the worker script; default /spool-sw.js