HtmlLivePreviewWrapper

class HtmlLivePreviewWrapper(srcFile: String, endpointRoot: String = DEFAULT_ENDPOINT_ROOT)

Renders the live-preview HTML wrapper, which embeds a target document inside double-buffered iframes with scroll preservation, and subscribes to a Server-Sent Events reload stream.

The reload URL is built by concatenating endpointRoot with the endpoint name (reload).

Parameters

srcFile

URL or path used as the iframe's src

endpointRoot

path prefix concatenated with the endpoint name to form the SSE URL. Defaults to DEFAULT_ENDPOINT_ROOT (/); pass e.g. "../" to produce ../reload.

Constructors

Link copied to clipboard
constructor(srcFile: String, endpointRoot: String = DEFAULT_ENDPOINT_ROOT)

Functions

Link copied to clipboard
fun render(): String

Renders the wrapper into a self-contained HTML document.