()
| 412 | // Complete initialization work that should be done prior to DOMReady. |
| 413 | // |
| 414 | async function initializePreDomReady() { |
| 415 | // Run this as early as possible, so the page can't register any event handlers before us. |
| 416 | installListeners(); |
| 417 | // NOTE(philc): I'm blocking further Vimium initialization on this, for simplicity. If necessary |
| 418 | // we could allow other tasks to run concurrently. |
| 419 | await checkIfEnabledForUrl(); |
| 420 | |
| 421 | Utils.addChromeRuntimeOnMessageListener( |
| 422 | Object.keys(messageHandlers), |
| 423 | handleMessage, |
| 424 | ); |
| 425 | } |
| 426 | |
| 427 | // Check if Vimium should be enabled or not based on the top frame's URL. |
| 428 | async function checkIfEnabledForUrl() { |
no test coverage detected