log events to console

master
adbenitez 2022-01-06 19:28:11 -05:00
parent 50972ab489
commit dc12bce134
1 changed files with 2 additions and 0 deletions

View File

@ -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) : [];