Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
JavaScript library for Syncro
JavaScript
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
MIT-LICENSE
README.markdown
jquery.js
superclass.js
supermodel.js
supermodel.marshal.js
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.