josephg / josephg/ShareJS

How to inform the client when init a `doc` that whether the `doc` exists or not?

Open
#397 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
5k
Forks
454
PR merge metrics
No merged PRs in 30d

Description

In the Wiki I found that a `Document` is identified by `collection` and `name`, aka:

``` javascript
Connection.prototype.get = function(collection, name, data) {
...
return doc;
};
```

I wrote like this to create a `doc`:

``` javascript
// Don't worry about `collection` since it is a fixed value,
// `name` is sometimes different because I need it to be,
// so that I can create different docs for users to cooperate with.
doc = connection.get(collection, name)
```

My question is how to inform the client(web browser) when initing a `doc` that whether the `doc` exists or not ?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.