MCPcopy Create free account
hub / github.com/ChromeDevTools/chrome-devtools-mcp / timeout

Method timeout

src/utils/WaitForHelper.ts:112–123  ·  view source on GitHub ↗
(time: number)

Source from the content-addressed store, hash-verified

110 }
111
112 timeout(time: number): Promise<void> {
113 if (this.#abortController.signal.aborted) {
114 return Promise.resolve();
115 }
116 return new Promise<void>(res => {
117 const id = setTimeout(res, time);
118 this.#abortController.signal.addEventListener('abort', () => {
119 res();
120 clearTimeout(id);
121 });
122 });
123 }
124
125 async waitForEventsAfterAction(
126 action: (signal: AbortSignal) => Promise<unknown>,

Callers 5

waitForStableDomMethod · 0.95
#findUISourceCodeMethod · 0.80
createStackTraceFunction · 0.80
browser.test.tsFile · 0.80

Calls 1

resolveMethod · 0.80

Tested by

no test coverage detected