(el: HTMLElement)
| 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 |
no test coverage detected