(el: Element, sel: string)
| 459 | } |
| 460 | |
| 461 | const safeMatches = (el: Element, sel: string): boolean => { |
| 462 | try { |
| 463 | return el.matches(sel); |
| 464 | } catch { |
| 465 | return false; |
| 466 | } |
| 467 | }; |
| 468 | |
| 469 | // Animated-target selectors of `target`'s DOM ancestors (in order, parent-first). |
| 470 | function animatedAncestors(doc: Document, target: string, animated: string[]): string[] { |