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

Function isTimedClipLeaf

packages/core/src/runtime/init.ts:1639–1645  ·  view source on GitHub ↗
(el: HTMLElement)

Source from the content-addressed store, hash-verified

1637 // with `visibility:visible`), so containers keep that and only leaves leave-flow.
1638 let timedClipIsLeaf = new WeakMap<Element, boolean>();
1639 const isTimedClipLeaf = (el: HTMLElement): boolean => {
1640 const cached = timedClipIsLeaf.get(el);
1641 if (cached !== undefined) return cached;
1642 const leaf = el.querySelector("[data-start]") === null;
1643 timedClipIsLeaf.set(el, leaf);
1644 return leaf;
1645 };
1646
1647 // Both caches key on live DOM facts that change when the timed-element set
1648 // changes: leaf status flips when a clip gains/loses a nested `[data-start]`

Callers 1

syncMediaForCurrentStateFunction · 0.85

Calls 3

getMethod · 0.80
querySelectorMethod · 0.65
setMethod · 0.65

Tested by

no test coverage detected