()
| 84 | } |
| 85 | |
| 86 | function detach() { |
| 87 | if (listening && typeof window !== 'undefined') { |
| 88 | window.removeEventListener('blur', onWindowBlur) |
| 89 | window.removeEventListener('focus', onWindowFocus) |
| 90 | if (modalityListening) { |
| 91 | window.removeEventListener('keydown', onKeyDown, true) |
| 92 | window.removeEventListener('pointerdown', onPointerDown, true) |
| 93 | } |
| 94 | } |
| 95 | listening = false |
| 96 | modalityListening = false |
| 97 | restoredFocusElement = null |
| 98 | lastInputWasKeyboard = true |
| 99 | if (clearTimer !== null) { |
| 100 | clearTimeout(clearTimer) |
| 101 | clearTimer = null |
| 102 | } |
| 103 | } |
| 104 | |
| 105 | export function subscribeFocusOpenGuards(): () => void { |
| 106 | const subscribedSession = session |
no outgoing calls
no test coverage detected