Skip to main content

assemble_preview

Function assemble_preview 

Source
pub fn assemble_preview(source: &str) -> Result<String, ParseError>
Expand description

Assemble a self-contained, sandboxable iframe srcdoc that COMPILES-and-RUNS an LGX app entirely in the browser — the wasm module is embedded inline (no file to fetch), the shared DOM runtime drives the iframe’s own document, and the default theme makes it beautiful. Powers the Studio’s live “Web” preview. On a build failure returns the ParseError (render it with error_overlay_html).