Spec
Top-level joy-dom document: the typed mirror of the spec JSON's root object.
Decode one with fromJson; the result feeds the layout/render pipeline (dom-layout resolves it into a render tree consumed by the platform renderers).
Parameters
document schema version. Always 1.
the style record: CSS selector string (div, .class, #id) → Style block.
media-query-conditioned style/node overrides, evaluated against the viewport.
the handlers region: event name → action, kept as raw JSON. A node's event prop names an entry here, and the action interpreter (dom-mutation) decodes it at dispatch time — the renderer never interprets one, so the typed action model stays out of the serialization layer. Absent on a document that owns no behaviour.
root Node of the document's element tree.
Throws
if version is not 1.