MCPcopy Create free account
hub / github.com/Alphanimble/htmlstream / settleStreamChunks

Function settleStreamChunks

src/stream-chunk.ts:16–27  ·  view source on GitHub ↗
(root: ParentNode)

Source from the content-addressed store, hash-verified

14
15/** Flatten reveal wrappers when streaming finishes. */
16export function settleStreamChunks(root: ParentNode): void {
17 root.querySelectorAll(`.${STREAM_CHUNK_CLASS}`).forEach((span) => {
18 const parent = span.parentNode;
19 if (!parent) {
20 return;
21 }
22 while (span.firstChild) {
23 parent.insertBefore(span.firstChild, span);
24 }
25 span.remove();
26 });
27}

Callers 1

streamhtml.tsxFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected