Send new value when element changes

This commit is contained in:
Frank A. Krueger 2017-06-15 23:27:07 -07:00
parent 2ee084be62
commit fa13b0948e
1 changed files with 4 additions and 1 deletions

View File

@ -63,9 +63,12 @@ function msgListen (m) {
id: m.id, id: m.id,
k: m.k, k: m.k,
}; };
if (m.k === "changed") {
em.v = node.value;
}
const ems = JSON.stringify (em); const ems = JSON.stringify (em);
socket.send (ems); socket.send (ems);
console.log ("Send event", em); console.log ("Event", em);
}); });
} }