MCPcopy
hub / github.com/darkreader/darkreader / awaitDOMContentLoaded

Function awaitDOMContentLoaded

src/inject/index.ts:228–234  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

226
227if (__TEST__) {
228 async function awaitDOMContentLoaded() {
229 if (document.readyState === 'loading') {
230 return new Promise<void>((resolve) => {
231 addEventListener('DOMContentLoaded', () => resolve(), {passive: true});
232 });
233 }
234 }
235
236 async function awaitDarkReaderReady() {
237 if (darkReaderDynamicThemeStateForTesting !== 'ready') {

Callers 1

index.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected