From dc12bce134ba6640b46fcc7e16fb273511394e3f Mon Sep 17 00:00:00 2001 From: adbenitez Date: Thu, 6 Jan 2022 19:28:11 -0500 Subject: [PATCH] log events to console --- webxdc.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/webxdc.js b/webxdc.js index c90a4ad..e46d0d7 100644 --- a/webxdc.js +++ b/webxdc.js @@ -7,6 +7,7 @@ window.webxdc = (() => { window.location.reload(); } else if (event.key === updatesKey) { var updates = JSON.parse(event.newValue); + console.log("[Webxdc] " + JSON.stringify(update)); updateListener(updates[updates.length-1]); } }); @@ -28,6 +29,7 @@ window.webxdc = (() => { sendUpdate: (payload, description) => { // alert(description+"\n\n"+JSON.stringify(payload)); var update = {payload: payload}; + console.log('[Webxdc] description="' + description + '", ' + JSON.stringify(update)); updateListener(update); var updatesJSON = window.localStorage.getItem(updatesKey); var updates = updatesJSON ? JSON.parse(updatesJSON) : [];