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

Function isCanonicalScope

packages/sdk/src/engine/model.ts:50–55  ·  view source on GitHub ↗

* True when an element lives at the top-level (canonical) scope — i.e. its * scopedId equals its bare id because no ancestor opens a sub-composition * boundary. This mirrors document.ts's scopedId construction (childPrefix only * changes at isNewHostBoundary elements) without rebuilding the snaps

(el: Element)

Source from the content-addressed store, hash-verified

48 * changes at isNewHostBoundary elements) without rebuilding the snapshot tree.
49 */
50function isCanonicalScope(el: Element): boolean {
51 for (let cur = el.parentElement; cur; cur = cur.parentElement) {
52 if (isNewHostBoundary(cur)) return false;
53 }
54 return true;
55}
56
57/**
58 * Resolve a bare or scoped hf-id to its DOM element.

Callers 1

resolveScopedFunction · 0.85

Calls 1

isNewHostBoundaryFunction · 0.85

Tested by

no test coverage detected