Skip to content

Commit

Permalink
fix default timeout for fetch window* methods
Browse files Browse the repository at this point in the history
  • Loading branch information
ronny1982 committed Feb 25, 2023
1 parent 384f23c commit 8e830d0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions web/src/engine/FetchProviderNodeWebkit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ async function FetchWindow(request: FetchRequest, timeout: number, preload: Prel
}));
}

export async function FetchWindowCSS<T extends HTMLElement>(request: FetchRequest, query: string, delay = 0, timeout?: number): Promise<T[]> {
export async function FetchWindowCSS<T extends HTMLElement>(request: FetchRequest, query: string, delay = 0, timeout = 60_000): Promise<T[]> {
const win = await FetchWindow(request, timeout);
try {
await Wait(delay);
Expand All @@ -257,7 +257,7 @@ export async function FetchWindowCSS<T extends HTMLElement>(request: FetchReques
}
}

export async function FetchWindowScript<T>(request: FetchRequest, script: string, delay = 0, timeout?: number): Promise<T> {
export async function FetchWindowScript<T>(request: FetchRequest, script: string, delay = 0, timeout = 60_000): Promise<T> {
return FetchWindowPreloadScript(request, () => undefined, script, delay, timeout);
}

Expand Down

0 comments on commit 8e830d0

Please sign in to comment.