Skip to main content

render_html_viewer

Function render_html_viewer 

Source
pub fn render_html_viewer(
    baseline: Option<&Snapshot>,
    current: Option<&Snapshot>,
) -> String
Expand description

Render a self-contained viewer with the snapshot data embedded inline. The snapshots are stored in <script type="application/json"> tags (cs-baseline / cs-current) so they can be both read by the viewer and extracted from the HTML later (see extract_embedded_snapshot). current only → review; both → diff.