Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

JavaScript library for Syncro

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 MIT-LICENSE
Octocat-spinner-32 README.markdown
Octocat-spinner-32 jquery.js
Octocat-spinner-32 superclass.js
Octocat-spinner-32 supermodel.js
Octocat-spinner-32 supermodel.marshal.js
Octocat-spinner-32 syncro.js
README.markdown

This is the JavaScript client library to syncro

Syncro-js opens a WebSocket connection to your Syncro server and will sync state between the two.

Examples:

<script src="jquery.js" type="text/javascript" charset="utf-8"></script>
<script src="superclass.js" type="text/javascript" charset="utf-8"></script>
<script src="supermodel.js" type="text/javascript" charset="utf-8"></script>
<script src="jquery.js" type="text/javascript" charset="utf-8"></script>

<script type="text/javascript" charset="utf-8">
  // Model
  var User = SuperModel.setup("User");
  User.attributes = ["name"];

  User.extend(SuperModel.Marshal);
  User.extend(Syncro.Model);

  // Connection
  Syncro.afterConnect(function(){
    console.log("Connected");
  });

  Syncro.connect("ws://syncro_server");
</script>

For information on SuperClass visit its project page.

For information on SuperModel visit its project page.

Something went wrong with that request. Please try again.