Skip to content

Instantly share code, notes, and snippets.

@antimatter15
Created January 4, 2010 23:23
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save antimatter15/268965 to your computer and use it in GitHub Desktop.
Save antimatter15/268965 to your computer and use it in GitHub Desktop.
window.wave={_state: {},callback: function(){},state: {
get: function(r){return wave._state[r]},
set: function(r,v){wave._state[r]=v},
getKeys: function(){var a=[];for(var i in wave._state)a.push(i);return a},
submitDelta: function(d){for(var i in d)wave.state.set(i,d[i]);wave.callback()}
},viewer: {id: "local@example.com",
getId: function(){return wave.viewer.id}},
getState:function(){return wave.state},
getViewer:function(){return wave.viewer},
isInWaveContainer:function(){return true},
setStateCallback:function(c){wave.callback=c}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment