Interface WebxdcProviderOptions

Source
Expand description

Configuration for WebxdcProvider.

interface WebxdcProviderOptions {
    autosaveInterval?: number;
    getEditInfo: () => EditInfo;
    resendAllUpdates?: boolean;
    webxdc: WebxdcTransport;
    ydoc: Doc;
}

Properties§

§autosaveInterval?: number

interval in milliseconds for automatic publishing of updates; If not supplied, it defaults to webxdc.sendUpdateInterval, or 10000 if the messaging layer does not expose this information, as per spec.

§getEditInfo: { ... }

a callback that returns display info for each update

§resendAllUpdates?: boolean

send the entire state of the ydoc with each change. Increased payload size but forces consistency over lost messages. Set to false to send only incremental updates (but dropped updates can cause permanent desynchronization).

default
true
§webxdc: WebxdcTransport

the webxdc object from window.webxdc

§ydoc: Doc

the YJS document to be synchronized