Name: jsas
Owner: Mozilla-B2G
Description: A Javascript ActiveSync library
Created: 2012-07-11 22:04:40.0
Updated: 2017-11-28 02:01:32.0
Pushed: 2016-02-15 05:35:22.0
Homepage: null
Size: 168
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
A Javascript ActiveSync library
If you'd like to test out ActiveSync, the easiest way is to start using the
files in the examples/
directory. This requires you to be able to perform
cross-origin XHRs on sites that don't explicitly let you do that.
In Firefox, you can host this repo on a local server (e.g. webfsd
) and then
allow your local domain to perform system XHRs by running this code in the
error console (replace the value of host
with wherever your server is
located):
= 'http://localhost:8000';
= Components.classes["@mozilla.org/permissionmanager;1"]
.createInstance(Components.interfaces.nsIPermissionManager);
= Components.classes["@mozilla.org/network/io-service;1"]
.getService(Components.interfaces.nsIIOService);
= ios.newURI(host, null, null);
.add(uri, 'systemXHR', 1);
cessfully added systemXHR permissions for '+host;
You'll then need to add a file named credentials.js
to the root directory of
jsas with variables named email
and password
, containing your account info.
ActiveSync uses sync keys to keep track of what state the client is in. They are very important! FolderSync uses a global sync key, while Sync uses a separate sync key for each folder. When syncing, be sure to use the same FilterType for all sync operations in that folder; otherwise, the server will invalidate your sync key and force you to perform a full resync.