Skip to content

writeHtml

writeHtml(flow): WriteResult

Defined in: src/html/html-writer.ts:85

Render a FlowDoc to a self-contained HTML document (ir-design §7).

A flow medium: no pagination, no layout engine and no fonts to embed, so this is a pure, zero-I/O transform. flow.body already carries FINAL effective properties (the Stage-6 contract), so values map straight to CSS; every read still routes through the cascade resolver over the empty sheet, a memoized identity on reader output. Charts and shapes emit as inline SVG; deliberately out of scope (reported as losses): inline math and headers/footers (no fixed pages to band them onto). Page-break hints map to CSS break-before.

FlowDoc

The format-neutral interlayer document tree.

WriteResult

The encoded HTML bytes plus the recorded Loss list.