element_getBoundingClientRect
Retrieve bounding rectangle of an element relative to the viewport, including CSS transform effects. Optionally use inner selector for cross-component queries.
Instructions
获取元素相对于视口的边界矩形信息(left、top、width、height、right、bottom)。此方法返回的是考虑 CSS transform 变换后的实际渲染尺寸和位置。支持跨组件查询:若需获取自定义组件内部元素,可将 selector 设为组件选择器,innerSelector 设为内部元素选择器。注意:目前仅支持 ID 选择器、类选择器。
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"selector": "<selector>"
},
"name": "element_getBoundingClientRect"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| connection | No | ||
| selector | Yes | ||
| innerSelector | No |