Field Notes
    Preparing search index...

    Interface AttachAwarenessOptions

    interface AttachAwarenessOptions {
        cursors?: false | RemoteCursorOverlayOptions;
        element?: HTMLElement;
        fields?: AwarenessFields;
        heartbeatMs?: number;
        identity: AwarenessIdentity;
        intervalMs?: number;
        onError?: (error: unknown) => void;
        publish?: boolean;
        roster?: PeerRosterOptions;
        selectionFilter?: (ids: readonly string[]) => readonly string[];
        selections?: boolean | RemoteSelectionOverlayOptions;
    }

    Hierarchy

    • Omit<LocalAwarenessOptions, "send">
      • AttachAwarenessOptions
    Index
    cursors?: false | RemoteCursorOverlayOptions

    Named cursor overlay options, or false to render no cursors. Default on.

    element?: HTMLElement

    Pointer listener target override; default host.domLayer.parentElement.

    Default { cursor: true, selection: false, tool: true }.

    heartbeatMs?: number

    Full-state re-send while idle, measured from the last send. Default 15000; 0 disables.

    identity: AwarenessIdentity
    intervalMs?: number

    Minimum spacing between frames. Default 50 (the relay lane throttle).

    onError?: (error: unknown) => void
    publish?: boolean

    false builds a receive-only attachment (no LocalAwareness). Default true. When false, identity is ignored: there is no publisher to carry it.

    roster?: PeerRosterOptions
    selectionFilter?: (ids: readonly string[]) => readonly string[]

    Host projection applied to selected ids before they leave the client. Fails closed: if it throws or returns anything but an array of strings, frames carry NO selection (never the unfiltered ids) until it next succeeds, and the error goes to onError.

    selections?: boolean | RemoteSelectionOverlayOptions

    Selection outline overlay: options or true to enable. Default off.