Clean up debug UI and code a bit. Allow empty StateEntry values.

This commit is contained in:
Ian Gulliver
2014-04-30 17:54:48 -07:00
parent a664bcebac
commit b02ddde215
3 changed files with 46 additions and 34 deletions

View File

@@ -149,6 +149,12 @@ cosmopolite.Client.prototype.setValue = function(key, value) {
'key': key,
'value': value,
})
// Provide immediate feedback without waiting for a round trip.
// We'll also get a response from the server, so this should be eventually
// consistent.
if ('onStateChange' in this.callbacks_) {
this.callbacks_['onStateChange'](key, value);
}
};
cosmopolite.Client.prototype.getValue = function(key) {