* `onFocus` notifies all subscribed listeners with the current focus state.
()
| 117 | * `onFocus` notifies all subscribed listeners with the current focus state. |
| 118 | */ |
| 119 | onFocus(): void { |
| 120 | const isFocused = this.isFocused() |
| 121 | this.listeners.forEach((listener) => { |
| 122 | listener(isFocused) |
| 123 | }) |
| 124 | } |
| 125 | |
| 126 | /** |
| 127 | * `isFocused` can be used to get the current focus state. |
no test coverage detected