MCPcopy
hub / github.com/philc/vimium / initializePreDomReady

Function initializePreDomReady

content_scripts/vimium_frontend.js:414–425  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

412// Complete initialization work that should be done prior to DOMReady.
413//
414async 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.
428async function checkIfEnabledForUrl() {

Callers 1

vimium_frontend.jsFile · 0.85

Calls 1

checkIfEnabledForUrlFunction · 0.85

Tested by

no test coverage detected