Skip to main content
Glama

element_getSize

Retrieve width and height measurements for elements in WeChat mini programs, including components using innerSelector for internal element sizing.

Instructions

获取元素大小(宽度和高度)。如需获取自定义组件内部元素的大小,请使用 innerSelector 参数:selector 设为组件 ID 选择器(如 #my-component),innerSelector 设为组件内部元素的选择器。

Input Schema

NameRequiredDescriptionDefault
connectionNo
selectorYes
innerSelectorNo

Input Schema (JSON Schema)

{ "properties": { "connection": { "additionalProperties": false, "properties": { "account": { "minLength": 1, "type": "string" }, "args": { "anyOf": [ { "type": "string" }, { "items": { "type": "string" }, "type": "array" }, { "not": {} } ] }, "autoClose": { "type": "boolean" }, "cliPath": { "minLength": 1, "type": "string" }, "cwd": { "minLength": 1, "type": "string" }, "mode": { "enum": [ "launch", "connect" ], "type": "string" }, "port": { "exclusiveMinimum": 0, "type": "integer" }, "projectPath": { "minLength": 1, "type": "string" }, "ticket": { "minLength": 1, "type": "string" }, "timeout": { "exclusiveMinimum": 0, "type": "integer" }, "trustProject": { "type": "boolean" }, "wsEndpoint": { "minLength": 1, "type": "string" } }, "type": "object" }, "innerSelector": { "minLength": 1, "type": "string" }, "selector": { "minLength": 1, "type": "string" } }, "required": [ "selector" ], "type": "object" }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/yfmeii/weapp-dev-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server