Appearance
Function: navigate()
ts
function navigate(ctx: Context, options: NavigateOptions): Promise<void | Context>;Defined in: src/pages/index.ts:355
Experimental
Navigate to a URL with configurable page creation options.
Parameters
| Parameter | Type | Description |
|---|---|---|
ctx | Context | The current Context. |
options | NavigateOptions | Navigation options including URL, tab creation, and background flags. |
Returns
Promise<void | Context>
A Context for the target page, or void when navigating in place.
Example
ts
// Open a vendor catalog in a new background tab.
const catalogCtx = await navigate(ctx, {
url: 'https://vendors.megacorp.com/catalog',
createPage: true,
background: true,
});