MCPcopy
hub / github.com/darkreader/darkreader / waitForEvent

Function waitForEvent

tests/inject/support/test-utils.ts:17–21  ·  view source on GitHub ↗
(eventName: string)

Source from the content-addressed store, hash-verified

15}
16
17export function waitForEvent(eventName: string): Promise<void> {
18 return new Promise<void>((resolve) => {
19 document.addEventListener(eventName, () => resolve(), {once: true});
20 });
21}

Callers 3

variables.tests.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected