From 50972ab48901e66b474320319d7b410c7b06ac99 Mon Sep 17 00:00:00 2001 From: adbenitez Date: Thu, 6 Jan 2022 19:16:58 -0500 Subject: [PATCH] adapt to recent API changes --- index.html | 2 +- webxdc.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index 753ec18..f1f8ddd 100644 --- a/index.html +++ b/index.html @@ -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) { diff --git a/webxdc.js b/webxdc.js index 8ccc8c6..c90a4ad 100644 --- a/webxdc.js +++ b/webxdc.js @@ -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);