The element type (e.g., HTMLElement | SVGElement for DOM)
Package split:
packages/core: Interface definition, reconcile function, thin wrapperspackages/dom: Live implementations (Client, Hydration, SSR)ReadonlyaddAdd a new slot to the container. Creates item/index signals internally and passes them to render callback. Handles enter animations in client mode.
ReadonlydefaultDefault container element.
Each environment provides its own implementation.
e.g., DOM uses $.div({ style: "display: contents" })
ReadonlyfinalizeSignal that the container's initial children have been processed. In hydration mode, this pops the container from the traversal stack so sibling elements are found correctly. No-op in client/SSR mode.
ReadonlyforkCreate a child context with isolated state. Each control function (when, match, each) calls this to get its own container and slots, preventing conflicts when nested or used with collect.
ReadonlygetGet or create the container element.
Uses defaultContainer if create is not provided.
ReadonlygetGet a slot by its key.
ReadonlygetGet all current slot keys. Reads from DOM in hydration mode.
ReadonlymoveMove a slot to a new index position. Noop in SSR mode.
ReadonlyremoveRemove a slot from the container. Noop in SSR, handles exit animations in client mode.
ReadonlysubscribeSubscribe to a Readable and run handler on each change. Noop in SSR, forks stream subscription in client/hydration.
Context interface for control flow operations. Abstracts SSR/Hydration/Client differences behind a unified API.