Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/fresh/tests/deps.ts>Page#waitForTimeout

The next-gen web framework.
Extremely Popular
Go to Latest
method Page.prototype.waitForTimeout
Re-export
Deprecated
Deprecated

Use new Promise(r => setTimeout(r, milliseconds));.

Causes your script to wait for the given number of milliseconds.

import { Page } from "https://deno.land/x/fresh@1.6.3/tests/deps.ts";

Examples

Wait for 1 second:

await page.waitForTimeout(1000);

Parameters

milliseconds: number
  • the number of milliseconds to wait.

Returns

Promise<void>