const source = new EventSource("/sse/zone-updates"); // Note that the event we gave our notify utility function is called "message_created" // so that's what we listen for here. source.addEventListener("zone_updated", function (evt) { // Parse the payload let payload = JSON.parse(evt.data); // TODO: update zone with zone:refresh. console.log(payload); App.refreshedZone(payload, false); });