navigateAndWait function application exported
Last updated: 2026-03-05T10:53:28.864Z
Metrics
LOC: 13
Complexity: 2
Params: 4
Signature
navigateAndWait(
tabId: number,
url: string,
timeoutMs = 30_000,
): : Promise<boolean>
Summary
Navigate a tab to url and wait until the page is fully loaded.
Tags
#@returns true when the target URL is loaded, false on timeout.
Source Code
export async function navigateAndWait(
tabId: number,
url: string,
timeoutMs = 30_000,
): Promise<boolean> {
try {
await chrome.tabs.update(tabId, { url });
return await waitForTabLoad(tabId, timeoutMs);
} catch (err) {
log.warn(`Navigation to ${url} failed:`, err);
return false;
}
}
Dependencies (Outgoing)
| Target | Type |
|---|---|
| createLogger | uses |
| waitForTabLoad | calls |
Impact (Incoming)
| Source | Type |
|---|---|
| OrchestratorCallbacks | uses |
| executeNavigateStep | calls |
| runLoop | calls |