Skip to content
Dashboard
Open .md fileOpen llms.txtA list of every page, for AI tools

Reference

Events

Run your code when the unread count changes.

Iris.on("unread", (count: number) => void): void

The listener runs once with the current count, then on every change. Use it to show a badge on your own button when the launcher is hidden.

app.js
const badge = document.querySelector("#help-badge");
Iris.on("unread", (count) => {
badge.textContent = String(count);
badge.hidden = !count;
});
MessageWhat happenedFix
Iris: on ignored the listener, because the event is not "unread" or the listener is not a function.#The event name is not "unread", or the listener is not a function.Pass "unread" and a function. See Events.