recordIframeContent

fun recordIframeContent(useHttp: Boolean, staticContent: Boolean, kslides: KSlides, path: String, filename: String, contentBlock: () -> String)

Record iframe content for later retrieval. In HTTP mode, the content is cached (by filename) either as a materialized string (when staticContent is true) or as a lambda that re-renders on each request. In filesystem mode, the content is written to <path>/<filename> immediately.

Used internally by com.kslides.playground and the letsPlot{} DSL; exposed publicly so custom extension DSLs in the same shape can reuse the caching pipeline.

Parameters

useHttp

true when serving via Ktor, false when writing static files.

staticContent

when useHttp is true, true caches the rendered string once; false caches the lambda so content is regenerated on every request.

kslides

owning KSlides instance (provides the shared iframe caches).

path

output directory for filesystem mode.

filename

file / cache key for the iframe content.

contentBlock

produces the HTML payload for the iframe.