(element?: Element | null, scope?: Element[] | null)
| 496 | } |
| 497 | |
| 498 | function isElementInScope(element?: Element | null, scope?: Element[] | null) { |
| 499 | if (!element) { |
| 500 | return false; |
| 501 | } |
| 502 | if (!scope) { |
| 503 | return false; |
| 504 | } |
| 505 | return scope.some(node => nodeContains(node, element)); |
| 506 | } |
| 507 | |
| 508 | function isElementInChildScope(element: Element, scope: ScopeRef = null) { |
| 509 | // If the element is within a top layer element (e.g. toasts), always allow moving focus there. |
no test coverage detected