Event pipeline HTML source

Put this in the widget's html field:

<output id="event-status">Waiting</output>

Put this in its javascript field:

const output = document.getElementById("event-status");
const acknowledge = values => selfWidget.patchState({
  ...selfWidget.state, ...values,
  ready: true, renderedText: output.textContent
});
function show(running) {
  output.textContent = running ? "Running" : "Stopped";
}
window.addEventListener("dikciz-ready", () => {
  if (typeof selfWidget.state.running === "boolean") {
    show(selfWidget.state.running);
  }
  dikciz.onEvent(async event => {
    if (event.type !== "example.changed") return;
    const running = event.payload.running === true;
    show(running);
    try {
      await acknowledge({ running });
    } catch (error) {
      console.error("Event acknowledgement failed", error.message);
    }
  });
  acknowledge({}).catch(error => {
    console.error("Readiness acknowledgement failed", error.message);
  });
});

Set eventSubscriptions in the saved widget record to [{"event":"example.changed","minimumIntervalMilliseconds":0}]. The field is not part of the typed patchWidget allowlist. Save the widget JSON or use the complete assembled configuration while preserving unrelated data.

Keep the page selected so the document remains rendered. The visible text changes when the event arrives. The saved ready: true confirms that the bridge is connected. renderedText is read from the output element after rendering. The state patch is a persisted acknowledgement that can be read remotely through widgetGet or configGet. After rendering is recreated, the saved Boolean restores the display.

Setup and verification. Lua handler.