> For AI agents: the complete documentation index is available at /next/llms.txt, the full documentation bundle is available at /next/llms-full.txt.

# SelectorQuery: selectRoot() method

APISummary
Select the root node specified by `SelectorQuery`.

When using `lynx.createSelectorQuery()`, the selected element is the root element `<page>` of the entire page.

## Syntax

```ts
selectRoot(): NodesRef;
```

### Parameters

None.

### Return Value

A `NodesRef` object instance representing this query result.

## Examples

Set grayscale to the entire page:

```tsx
lynx
  .createSelectorQuery()
  .selectRoot()
  .setNativeProps({
    filter: 'grayscale(100%)',
  })
  .exec();
```

## Compatibility

**Compatibility Table**

**Query:** `lynx-api.selector-query.selectRoot`

[Source](https://github.com/lynx-family/lynx-website/tree/main/packages/lynx-compat-data/lynx-api/selector-query/selectRoot.json)

| Feature | Android | HarmonyOS | iOS | macOS | Windows | Web |
| --- | --- | --- | --- | --- | --- | --- |
| selectRoot | Yes (2.4) | Yes (3.4) | Yes (2.4) | Yes (3.7) | Yes (3.7) | Yes |

**`selectRoot`**

Select the root node specified by `SelectorQuery`.

