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

# Page

本页面介绍 Lynx DevTool 支持的 `Page` CDP domain。



:::warning 实验性参考
此生成的参考文档仍在完善中。

- CDP events 尚未包含。
- 部分 Lynx 扩展已列出，但尚未提供详细文档。
- 方法说明尚未根据实现自动校验，可能不完整或不准确。

在依赖本参考前，请根据实现及所链接的 upstream CDP reference 验证实际行为。
:::

## 概览

- 作用域：`instance`
- CDP domain：[Page](https://chromedevtools.github.io/devtools-protocol/tot/Page/)

## 标准方法

- [Page.enable](https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-enable)
- [Page.getResourceContent](https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-getResourceContent)
- [Page.getResourceTree](https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-getResourceTree)
- [Page.navigate](https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-navigate)
- [Page.reload](https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-reload)
- [Page.screencastFrameAck](https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-screencastFrameAck)
- [Page.startScreencast](https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-startScreencast)
- [Page.stopScreencast](https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-stopScreencast)

## Lynx 扩展

### `Page.canEmulate`

Reports that the Lynx page target supports emulation commands.

- Origin: `lynx-extension`
- Source: `devtool/lynx_devtool/agent/domain_agent/inspector_page_agent_ng.cc`

###### 参数

无参数。

###### 返回字段

| Name     | Type      | Description                                                    |
| -------- | --------- | -------------------------------------------------------------- |
| `result` | `boolean` | Always true when the request is dispatched to the UI executor. |

###### 备注

- Dispatches through LynxDevToolMediator to InspectorUIExecutor on the UI thread.
- The native implementation does not inspect platform state or request params. It returns result.result as true.
- If the mediator has no UI task runner, the current handler does not send an explicit CDP response.

###### 示例

**Check emulation support**

Request:

```json
{
  "id": 1,
  "method": "Page.canEmulate"
}
```

Response:

```json
{
  "id": 1,
  "result": {
    "result": true
  }
}
```

### `Page.canScreencast`

Reports that the Lynx page target supports screencast commands.

- Origin: `lynx-extension`
- Source: `devtool/lynx_devtool/agent/domain_agent/inspector_page_agent_ng.cc`

###### 参数

无参数。

###### 返回字段

| Name     | Type      | Description                                                    |
| -------- | --------- | -------------------------------------------------------------- |
| `result` | `boolean` | Always true when the request is dispatched to the UI executor. |

###### 备注

- Dispatches through LynxDevToolMediator to InspectorUIExecutor on the UI thread.
- The native implementation does not inspect platform state or request params. It returns result.result as true.
- If the mediator has no UI task runner, the current handler does not send an explicit CDP response.

###### 示例

**Check screencast support**

Request:

```json
{
  "id": 1,
  "method": "Page.canScreencast"
}
```

Response:

```json
{
  "id": 1,
  "result": {
    "result": true
  }
}
```

