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

Function serializeDocument

packages/sdk/src/engine/serialize.ts:16–22  ·  view source on GitHub ↗
(parsed: ParsedDocument)

Source from the content-addressed store, hash-verified

14 * If the original input had a full HTML shell (wrapped=false), returns the full document.
15 */
16export function serializeDocument(parsed: ParsedDocument): string {
17 const doc = parsed.document;
18 if (parsed.wrapped) {
19 return (doc.body as HTMLBodyElement).innerHTML ?? "";
20 }
21 return `<!DOCTYPE html>\n${doc.documentElement.outerHTML}`;
22}

Callers 5

serializeMethod · 0.85
mutate.test.tsFile · 0.85
getStyleTextFunction · 0.85
getScriptFunction · 0.85

Calls

no outgoing calls

Tested by 2

getStyleTextFunction · 0.68
getScriptFunction · 0.68