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

Function parseHTMLContent

packages/core/src/compiler/htmlDocument.ts:29–35  ·  view source on GitHub ↗
(html: string)

Source from the content-addressed store, hash-verified

27 * fragment content under document.body.
28 */
29export function parseHTMLContent(html: string): Document {
30 const trimmed = html.trimStart().toLowerCase();
31 if (trimmed.startsWith("<!doctype") || trimmed.startsWith("<html")) {
32 return parseHTML(html).document;
33 }
34 return parseHTML(`<!DOCTYPE html><html><head></head><body>${html}</body></html>`).document;
35}
36
37export function stripEmbeddedRuntimeScripts(html: string): string {
38 if (!html) return html;

Callers 3

bundleToSingleHtmlFunction · 0.90
unwrapTemplateFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected