(chunk, controller)
| 72 | let loaded = 0; |
| 73 | return stream.pipeThrough(new TransformStream({ |
| 74 | transform(chunk, controller) { |
| 75 | loaded += chunk.byteLength; |
| 76 | if (total > 0) { |
| 77 | bar.value = loaded / total; |
| 78 | const pct = Math.min(100, Math.floor(100 * loaded / total)); |
| 79 | setStatus(`Loading WebAssembly… ${pct}%${ofMB}`); |
| 80 | } else { |
| 81 | setStatus(`Loading WebAssembly…`); |
| 82 | } |
| 83 | controller.enqueue(chunk); |
| 84 | }, |
| 85 | })); |
| 86 | } |
| 87 |
nothing calls this directly
no test coverage detected