---
url: >-
  https://lit-ui-router.dev/reference/lit-ui-router/core/RouterContextRequestEvent.md
---
[lit-ui-router](../index.md) / RouterContextRequestEvent

# Class: RouterContextRequestEvent

Defined in: [packages/lit-ui-router/src/context.ts:164](https://github.com/simshanith/lit-ui-router/blob/740888c2b2ba358c4dfa52a122e927df6a604b12/packages/lit-ui-router/src/context.ts#L164)

A `context-request` event for [routerContext](routerContext.md) — the router instance of
[ContextRequestEvent](ContextRequestEvent.md).

## Extends

* [`ContextRequestEvent`](ContextRequestEvent.md)<[`RouterContext`](../types/RouterContext.md)>

## Constructors

### Constructor

```ts
new RouterContextRequestEvent(callback, subscribe?): RouterContextRequestEvent;
```

Defined in: [packages/lit-ui-router/src/context.ts:169](https://github.com/simshanith/lit-ui-router/blob/740888c2b2ba358c4dfa52a122e927df6a604b12/packages/lit-ui-router/src/context.ts#L169)

#### Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `callback` | [`ContextCallback`](../types/ContextCallback.md)<[`UIRouterLit`](UIRouterLit.md)> | receives the router from whichever provider answers |
| `subscribe?` | `boolean` | ask the provider to call back as the router changes |

#### Returns

`RouterContextRequestEvent`

#### Overrides

[`ContextRequestEvent`](ContextRequestEvent.md).[`constructor`](ContextRequestEvent.md#constructor)

## Properties

| Property | Modifier | Type | Description | Inherited from | Defined in |
| ------ | ------ | ------ | ------ | ------ | ------ |
|  `callback` | `readonly` | [`ContextCallback`](../types/ContextCallback.md)<[`UIRouterLit`](UIRouterLit.md)> | Called by the provider with the value. | [`ContextRequestEvent`](ContextRequestEvent.md).[`callback`](ContextRequestEvent.md#callback) | [packages/lit-ui-router/src/context.ts:137](https://github.com/simshanith/lit-ui-router/blob/740888c2b2ba358c4dfa52a122e927df6a604b12/packages/lit-ui-router/src/context.ts#L137) |
|  `context` | `readonly` | [`RouterContext`](../types/RouterContext.md) | The key this request is for, matched by identity. | [`ContextRequestEvent`](ContextRequestEvent.md).[`context`](ContextRequestEvent.md#context) | [packages/lit-ui-router/src/context.ts:135](https://github.com/simshanith/lit-ui-router/blob/740888c2b2ba358c4dfa52a122e927df6a604b12/packages/lit-ui-router/src/context.ts#L135) |
|  `subscribe?` | `readonly` | `boolean` | Whether later values are wanted. | [`ContextRequestEvent`](ContextRequestEvent.md).[`subscribe`](ContextRequestEvent.md#subscribe) | [packages/lit-ui-router/src/context.ts:139](https://github.com/simshanith/lit-ui-router/blob/740888c2b2ba358c4dfa52a122e927df6a604b12/packages/lit-ui-router/src/context.ts#L139) |
