CollabReferenceCollab clientClasses
LongPollListener
Class: LongPollListener
Defined in: packages/collab-client/src/index.ts:140
A CommitsListener that polls an endpoint for remote updates to a document. Intended to be used with an remote long polling endpoint that calls a Collab Authority's listenForCommit function to efficiently listen for updates.
Constructors
Constructor
new LongPollListener(url: URL, options?: LongPollListenerOptions): LongPollListener;Defined in: packages/collab-client/src/index.ts:147
Parameters
url
URL
the url that polling requests will be sent to
options?
Returns
LongPollListener
Methods
listen()
listen(editorState: EditorState, options?: {
signal?: AbortSignal;
}): AsyncGenerator<Commit[], void, unknown>;Defined in: packages/collab-client/src/index.ts:162
Parameters
editorState
EditorState
options?
signal?
AbortSignal
Returns
AsyncGenerator<Commit[], void,
unknown>
update()
update(headers: HeadersInit): void;Defined in: packages/collab-client/src/index.ts:158
Update the headers sent with long polling requests.
Parameters
headers
HeadersInit
Returns
void