107 Commits

Author SHA1 Message Date
Ian Gulliver
c744a2cde6 Type annotations for EventTarget imports. 2016-01-07 21:09:38 -08:00
Ian Gulliver
7dcae7e88f Remove duplicate function. 2016-01-07 20:55:25 -08:00
Ian Gulliver
c9626a7616 Add isConnected() 2016-01-07 20:51:46 -08:00
Ian Gulliver
5eb3674833 Batch saving to localStorage on initial subscribe; makes a big difference when we have lots of messages. 2016-01-05 22:47:31 -08:00
Ian Gulliver
5280b710d2 Shortcut calling onMessage for everything in cache. 2016-01-05 20:44:28 -08:00
Ian Gulliver
77227df9aa Don't re-write the message cache while we're processing it. 2016-01-05 19:12:57 -08:00
Ian Gulliver
59fab5e3c6 localStorage cache for subject messages. 2016-01-05 18:51:27 -08:00
Ian Gulliver
6ee8dc4f05 Switch to a PRNG implementation that doesn't have a birthday problem. 2015-12-30 22:01:25 -08:00
Ian Gulliver
fb85596501 Better error description. Add a TODO to fix pin() error handling. 2015-12-29 15:14:14 -08:00
Ian Gulliver
3b3755f7f5 Add amOwner() and amWriter(). Reject sendMessage() if we lack write access. 2015-12-29 12:00:35 -08:00
Ian Gulliver
fdd1b85539 Allow uuid() to be called statically. 2015-12-27 21:08:36 -08:00
Ian Gulliver
cec8a6c9d3 Fix the remaining lint errors. 2015-10-16 16:23:29 +02:00
Ian Gulliver
f77007e047 Fix some lint errors from previous commit. 2015-10-15 21:55:55 +02:00
Ian Gulliver
a59f7f97f3 Add support for "local" subjects, which don't get pushed to the serve and get destroyed on unsubscribe. 2015-10-15 19:05:39 +02:00
Ian Gulliver
1e6da9504a Set request and response content type to json. 2015-05-31 21:23:45 -07:00
Ian Gulliver
3fa24f803d Switch to idiomatic JS Event framework.
Remove Unity debugging, as we no longer have interested clients.
2015-05-31 18:00:07 -07:00
Ian Gulliver
eb536ae20a Change XMLHttpRequest call ordering to satisfy firefox. 2014-11-15 17:30:02 -08:00
Ian Gulliver
f675715317 Bugfixes for "me" ACL. 2014-06-21 17:29:10 -07:00
Ian Gulliver
959049af59 Add connected() function. 2014-06-17 21:28:47 -07:00
Ian Gulliver
c210d826b2 Send profile with every RPC response. 2014-06-17 21:14:59 -07:00
Ian Gulliver
a1ee25a937 Clear pin state before subscribe events. 2014-06-17 21:06:43 -07:00
Ian Gulliver
3629f3c266 Const correctness for private members 2014-06-15 14:46:06 -07:00
Ian Gulliver
bf07fc6196 Doc cleanups. Make public docstrings refer to the website. 2014-06-14 12:23:19 -07:00
Ian Gulliver
10b4c10e83 Make uuid() public 2014-06-13 22:13:01 -07:00
Ian Gulliver
7d45f44265 Survive clearing of localStorage while we're running by caching client ID. 2014-06-13 21:33:19 -07:00
Ian Gulliver
40229ff0c0 Return the new message for sendMessage and pin RPCs. Pass it through the sendMessage Promise callback. 2014-06-12 23:12:00 -07:00
Ian Gulliver
fed379ddc7 Remove duplicate message logging; they're a normal thing now. 2014-06-12 22:55:27 -07:00
Ian Gulliver
828a9c50ea Add bulk subscribe support. 2014-06-11 21:46:50 -07:00
Ian Gulliver
bc42e8d5e3 Compiler fixes 2014-06-11 21:32:17 -07:00
Ian Gulliver
d09eee1259 Clean up use of promises to do more sensible things with exceptions. 2014-06-11 21:11:22 -07:00
Ian Gulliver
1904d6bf50 More reliable document ready detection. 2014-06-09 23:04:18 -07:00
Ian Gulliver
8af50befbe Don't try to add things to the DOM until it loads. 2014-06-09 22:47:51 -07:00
Ian Gulliver
2692d540e8 Change delay to milliseconds and make the backoff/stagger algorithm smarter. 2014-06-09 22:11:34 -07:00
Ian Gulliver
94491649a1 Cleanups from documentation effort. 2014-06-08 11:38:40 -07:00
Ian Gulliver
074820d770 Tracking bugfix, annotation fixes. 2014-06-01 21:49:29 -07:00
Ian Gulliver
c004d27e9d Get javascript loading out of the critical path. 2014-06-01 15:27:43 -07:00
Ian Gulliver
b84b733e56 Remove RPC queueing now that we're doing client-side client_id generation. 2014-06-01 13:41:45 -07:00
Ian Gulliver
fd5569c5dc Generate the client_id on the client, so we don't need a round trip to get it before we can send arbitrary RPCs.
This changes the Profile/Client relationship; we never needed to be transactional with them, so split them up entirely so we can reparent Clients.
2014-05-31 23:25:15 -07:00
Ian Gulliver
0ab2fe620c lint/compiler cleanups 2014-05-31 11:51:16 -07:00
Ian Gulliver
54dcc98b00 Google analytics support for load and subscribe events. 2014-05-31 11:41:37 -07:00
Ian Gulliver
14ba801e09 Fix resubscription broken by recent change. 2014-05-30 17:00:06 -07:00
Ian Gulliver
e1288a67fb Fixes for read/write ACLs on server and client side 2014-05-30 16:42:30 -07:00
Ian Gulliver
8982e0e2b5 Fix nasty retry bug that causes us to not reconnect. 2014-05-30 11:23:32 -07:00
Ian Gulliver
5d39c9abdf Last ugly style guide compliance fixes 2014-05-28 23:25:53 -07:00
Ian Gulliver
d5941a49f7 Whitespace for strict linting. 2014-05-28 21:52:12 -07:00
Ian Gulliver
9e791bcf3b Move types inside our namespace to avoid polluting globals. Make some private. 2014-05-28 21:43:27 -07:00
Ian Gulliver
6ca7247fc9 Lots of style fixes for JavaScript 2014-05-28 21:32:01 -07:00
Ian Gulliver
4427af1505 Combined our two post-connect functions into one, so we make less HTTP calls. 2014-05-27 16:32:59 -07:00
Ian Gulliver
6d6950624f Add onConnect/onDisconnect callbacks 2014-05-27 15:48:03 -07:00
Ian Gulliver
1dd1490518 Pin test, fixes, cleanup 2014-05-27 15:33:51 -07:00