Skip to main content

render

Function render 

Source
pub fn render(
    protocol_bytes: &[u8],
    state_json: &str,
    on_chunk: &Function,
    options: Option<Object>,
) -> Result<(), JsValue>
Expand description

Render a pre-built WebUI protocol with state data, streaming chunks to a callback.

§Arguments

  • protocol_bytes - Protobuf bytes of the serialized WebUIProtocol.
  • state_json - JSON string of the state data.
  • on_chunk - Callback invoked with each rendered HTML fragment.
  • options - Optional object with entry, requestPath, and plugin fields.

§Returns

Nothing on success, or throws a JS error on failure.