(element?: Element | null, scope?: Element[] | null)
| 479 | } |
| 480 | |
| 481 | function isElementInScope(element?: Element | null, scope?: Element[] | null) { |
| 482 | if (!element) { |
| 483 | return false; |
| 484 | } |
| 485 | if (!scope) { |
| 486 | return false; |
| 487 | } |
| 488 | return scope.some(node => nodeContains(node, element)); |
| 489 | } |
| 490 | |
| 491 | function isElementInChildScope(element: Element, scope: ScopeRef = null) { |
| 492 | // If the element is within a top layer element (e.g. toasts), always allow moving focus there. |
no test coverage detected