> 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.

# Function: generateMainThreadScriptResult()

> **generateMainThreadScriptResult**(`xmlFragment`: `string`): [`GeneratedMainThreadScript`](/next/zh/api/genui/lynx-xml/interfaces/GeneratedMainThreadScript.md)

生成 Element PAPI 调用，以及稳定的 id 到节点的绑定。

## Parameters

| Parameter     | Type     |
| ------------- | -------- |
| `xmlFragment` | `string` |

## Returns

[`GeneratedMainThreadScript`](/next/zh/api/genui/lynx-xml/interfaces/GeneratedMainThreadScript.md)
