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

Function isTimedClipInFlow

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

Source from the content-addressed store, hash-verified

1621 // and avoids disturbing absolute media playback). Computed once per element.
1622 let timedClipInFlow = new WeakMap<Element, boolean>();
1623 const isTimedClipInFlow = (el: HTMLElement): boolean => {
1624 const cached = timedClipInFlow.get(el);
1625 if (cached !== undefined) return cached;
1626 const pos = window.getComputedStyle(el).position;
1627 const inFlow = pos === "static" || pos === "relative" || pos === "sticky";
1628 timedClipInFlow.set(el, inFlow);
1629 return inFlow;
1630 };
1631
1632 // `display:none` is only safe on a LEAF timed clip (no nested timed clips). On a
1633 // container it removes the whole subtree, hiding descendants that are still inside

Callers 1

syncMediaForCurrentStateFunction · 0.85

Calls 2

getMethod · 0.80
setMethod · 0.65

Tested by

no test coverage detected