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