Introducing
Your new presentation assistant.
Refine, enhance, and tailor your content, source relevant images, and edit visuals quicker than ever before.
Trending searches
state callback
state delta
state:
vote-douwe@google.com | 1
function onClick() {
wave.getState().submitValue('vote-' wave.getViewer().getId(), -1);
}
wave.setStateCallback(update);
function update() {
var keys = wave.getState().getKeys();
for (var i = 0; i < keys.length; i++) {
var key = keys[i];
if (key.match('^vote-')) {
total += parseInt(wave.getState().get(key));
count++;
}
}
document.getElementById('total').innerHTML = total;
}