Skip to content

BrowserPage.reload()

David Ortner edited this page Jan 12, 2024 · 1 revision

Reloads the current URL.

Signature

reload(options?: IGoToOptions): void;

Parameters

Parameter Type Description
options? IGoToOptions Options (Optional)

Returns

void

Example

import { Browser } from "happy-dom";

const browser = new Browser();
const page = browser.newPage();

// Reloads the current URL.
await page.reload({
   referrer: 'https://github.com/capricorn86/happy-dom/',
   referrerPolicy: 'origin-when-cross-origin'
});

await browser.close();
Clone this wiki locally