MCPcopy Create free account
hub / github.com/heygen-com/hyperframes / buildRoots

Function buildRoots

packages/sdk/src/document.ts:202–213  ·  view source on GitHub ↗
(document: Document)

Source from the content-addressed store, hash-verified

200 * the session's query API uses against its mutable document.
201 */
202export function buildRoots(document: Document): HyperFramesElement[] {
203 const body = document.body;
204 const roots: HyperFramesElement[] = [];
205 const animationIdsByHfId = buildAnimationIdMap(document);
206 if (body) {
207 for (const child of Array.from(body.children)) {
208 const built = buildElement(child, "", animationIdsByHfId);
209 if (built) roots.push(built);
210 }
211 }
212 return roots;
213}
214
215/**
216 * Parse an HTML string into the SDK document model.

Callers 3

buildDocumentFunction · 0.85
getElementsMethod · 0.85

Calls 3

buildAnimationIdMapFunction · 0.85
buildElementFunction · 0.85
fromMethod · 0.80

Tested by

no test coverage detected