bitflow / one task on its own

This page imports @bitflow/task-choice and nothing else. No flow, no editor, no other task type — one import defines the element and it works.

What the page hears



      

All of the code

import "@bitflow/task-choice";

const task = document.querySelector("bitflow-task-choice");
task.data = { /* the question and its choices */ };

task.addEventListener("bitflow-answerchange", (e) => e.detail.answer);
task.addEventListener("bitflow-evaluated", (e) => e.detail.result);