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

# Function: generateMainThreadScript()

> **generateMainThreadScript**(`xmlFragment`: `string`): `string`

Convert an XML element fragment into Element PAPI calls for renderPage().

## Parameters

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

## Returns

`string`
