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 serializedWebUIProtocol.state_json- JSON string of the state data.on_chunk- Callback invoked with each rendered HTML fragment.options- Optional object withentry,requestPath, andpluginfields.
§Returns
Nothing on success, or throws a JS error on failure.