Skip to content
This repository was archived by the owner on Apr 2, 2024. It is now read-only.

Commit a67ad42

Browse files
authored
Clarify README for doc.ingestSnapshot(snapshot, callback)
Addresses documentation issue raised in share#254
1 parent abffed5 commit a67ad42

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ Populate the fields on `doc` with a snapshot of the document from the server, an
267267
fire events on subsequent changes.
268268

269269
`doc.ingestSnapshot(snapshot, callback)`
270-
Ingest snapshot data. This data must include a version, snapshot and type. This method is generally called interally as a result of fetch or subscribe and not directly. However, it may be called directly to pass data that was transferred to the client external to the client's ShareDB connection, such as snapshot data sent along with server rendering of a webpage.
270+
Ingest snapshot data. The `snapshot` param must include the fields `v` (doc version), `data`, and `type` (OT type). This method is generally called interally as a result of fetch or subscribe and not directly from user code. However, it may still be called directly from user code to pass data that was transferred to the client external to the client's ShareDB connection, such as snapshot data sent along with server rendering of a webpage.
271271

272272
`doc.destroy()`
273273
Unsubscribe and stop firing events.

0 commit comments

Comments
 (0)