DOM adoption
attemptHydrationfunction
Locates a compatible SSR template range for an advanced render context.
DOM document selection
CurrentRenderDocumentvariable
A service that provides the
Documentinterface for rendering.Defaults to the global
documentobject. This can be overridden for testing or environments where the global document is not available or desired.
DOM mounting
rendervariable
Mounts any
Renderableto a specific DOM element.This function lifts primitives, arrays, Effects, Streams, and Fx values into a render stream and keeps the target DOM element updated. It handles:
- Mounting the initial content.
- Updating the content as new events are emitted.
- Hydrating the content if hydration context is provided.
DOM output inference
ToRenderedtype-alias
Computes the DOM value represented by a nullable
RenderEvent.
DOM template interpretation
DomRenderTemplatevariable
A Layer that provides the
RenderTemplateservice implemented for DOM rendering.This layer enables templates to be rendered as actual DOM nodes. It handles:
- Parsing templates into DOM fragments.
- Caching parsed templates.
- Hydrating from existing DOM (if applicable).
- Setting up event listeners.
- Managing fine-grained updates to DOM nodes via
Fxstreams.
Render scheduling
CurrentRenderPriorityvariable
A service that provides the default priority for rendering tasks.
The default value is
RenderPriority.Raf(10), which typically schedules updates to occur before the next repaint.CurrentRenderQueuevariable
A service that manages the queue of DOM updates.
It ensures that DOM updates are batched and executed efficiently, often coordinating with browser painting cycles (e.g., via
requestAnimationFrame).
Renderable normalization
liftRenderableToFxfunction
Converts any Renderable into an Fx while preserving its nested errors and service requirements.
Template run context
TemplateContexttype-alias
Advanced per-template DOM rendering state used by renderer extensions.