()
| 158 | }); |
| 159 | |
| 160 | function installModes() { |
| 161 | // Install the permanent modes. The permanently-installed insert mode tracks focus/blur events, |
| 162 | // and activates/deactivates itself accordingly. |
| 163 | normalMode = new NormalMode(); |
| 164 | normalMode.init(); |
| 165 | // Initialize components upon which normal mode depends. |
| 166 | Scroller.init(); |
| 167 | FindModeHistory.init(); |
| 168 | new InsertMode({ permanent: true }); |
| 169 | if (isEnabledForUrl) { |
| 170 | new GrabBackFocus(); |
| 171 | } |
| 172 | // Return the normalMode object (for the tests). |
| 173 | return normalMode; |
| 174 | } |
| 175 | |
| 176 | // document is null in our tests. |
| 177 | let previousUrl = globalThis.document?.location.href; |
no test coverage detected