adapt to recent API changes
This commit is contained in:
parent
9b048aebe4
commit
50972ab489
|
@ -12,7 +12,7 @@
|
|||
|
||||
function sendMsg() {
|
||||
msg = document.getElementById("input").value;
|
||||
window.webxdc.sendUpdate('someone typed "'+msg+'"', {"name": window.webxdc.selfName(), "msg": msg});
|
||||
window.webxdc.sendUpdate({"name": window.webxdc.selfName(), "msg": msg}, 'someone typed "'+msg+'"');
|
||||
}
|
||||
|
||||
function receiveUpdate(update) {
|
||||
|
|
|
@ -25,7 +25,7 @@ window.webxdc = (() => {
|
|||
var updatesJSON = window.localStorage.getItem(updatesKey);
|
||||
return updatesJSON ? JSON.parse(updatesJSON) : [];
|
||||
},
|
||||
sendUpdate: (description, payload) => {
|
||||
sendUpdate: (payload, description) => {
|
||||
// alert(description+"\n\n"+JSON.stringify(payload));
|
||||
var update = {payload: payload};
|
||||
updateListener(update);
|
||||
|
|
Loading…
Reference in a new issue