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

Function ambiguousHtml

packages/sdk/src/session.subcomp.test.ts:449–457  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

447 // dup appears AFTER it. querySelector document-order would return the inner one,
448 // but getElement prefers the canonical (top-level) match. The two APIs must agree.
449 const ambiguousHtml = () =>
450 inlinedHtml(`
451 <div data-hf-id="hf-root" data-hf-root>
452 <div data-hf-id="hf-host" data-composition-file="sub.html">
453 <p data-hf-id="hf-dup" class="inner">inner</p>
454 </div>
455 <p data-hf-id="hf-dup" class="outer">outer</p>
456 </div>
457 `);
458
459 it("bare id resolves to the canonical (top-level) instance, matching getElement", async () => {
460 const comp = await openComposition(ambiguousHtml());

Callers 1

Calls 1

inlinedHtmlFunction · 0.85

Tested by

no test coverage detected