# toHtml

Converts a `Rendered` value to an HTML string.

## Signatures

```ts
export declare function toHtml(node: Rendered): string;
```

## Why

DOM integrations can expose a diagnostic/string representation while
preserving their concrete nodes for DOM consumers.

## Ownership and lifetime

Serialization reads the current DOM and neither moves nor retains nodes. It
is not the streaming SSR renderer and does not sanitize existing markup.

## Examples

```ts
import { toHtml } from "@typed/template/Wire"

const div = document.createElement("div")
div.textContent = "Hello"
const html = toHtml(div) // "<div>Hello</div>"

const fragment = document.createDocumentFragment()
fragment.appendChild(div)
const fragmentHtml = toHtml(fragment) // "<div>Hello</div>"
```
