MCPcopy Create free account
hub / github.com/MeshInspector/MeshLib / start

Function start

wasm/web_request.js:196–209  ·  view source on GitHub ↗
(controller)

Source from the content-addressed store, hash-verified

194 return new Response(
195 new ReadableStream({
196 async start(controller) {
197 const reader = response.body.getReader();
198 for (; ;) {
199 const { done, value } = await reader.read();
200 if (done) {
201 break;
202 }
203 loaded += value.byteLength;
204 var v = loaded / total;
205 Module.ccall('emsCallDownloadCallback', 'number', ['number', 'number'], [v, ctxId]);
206 controller.enqueue(value);
207 }
208 controller.close();
209 }
210 })
211 );
212 })

Callers

nothing calls this directly

Calls 2

readMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected