pull-only: no start, only pull
Open devtools and click "Create Stream" first — there is NO start() so nothing happens until you read().
let counter = 0;
const stream = new ReadableStream({
pull(controller) {
counter++;
controller.enqueue(new Uint8Array([counter]));
if (counter >= 5) controller.close();
},
cancel(r) { counter = 0; },
});