Package-level declarations

Types

Link copied to clipboard
fun interface KotlinxHtmlAdapter

Explicitly installs handlers/providers without coupling syntax extensions to this renderer.

Link copied to clipboard
interface KotlinxHtmlNodeRendererContext : AttributeProviderContext

Per-render state. Child nodes must go through render to honor registered adapters.

Link copied to clipboard

Creates a fresh handler, including any document-local state, for each render call.

Link copied to clipboard
class KotlinxHtmlRenderer : Renderer

Renders AST nodes as kotlinx.html events. No syntax extension is loaded implicitly.

Functions

Link copied to clipboard

Creates a renderer with a snapshot of the configured options and registrations.

Link copied to clipboard
inline fun <N : Node> KotlinxHtmlRenderer.Configuration.nodeRenderer(crossinline block: KotlinxHtmlNodeRendererContext.(N) -> Unit)

Registers a handler for exactly N; the first registration for a node type wins. The receiver belongs to the current render. Captured mutable state in block is shared; use KotlinxHtmlRenderer.Configuration.nodeRendererFactory for state local to each render or for lifecycle hooks. Custom handlers remain responsible for URL processing.