SSR / API

foldkit-ssr/client

foldkit-ssr/client: what a browser page needs to take a server render over, and nothing that renders one. It never imports foldkit/experimental/server, whose renderer and HTML parser a hydrating page would otherwise carry; foldkit-ssr is this and the server side.

Namespaces

Diagnostics
ResumeThe resumable track: bindings the server's markup names, so a page can answer before it boots.
SSRThe browser's part of SSR: the same functions, without the server's.

Functions

metaMarkupThe head markup of a Meta, every value escaped, one element per line.

Values

BINDING_ATTRIBUTEThe attribute prefix of an element's binding marker.
FALLBACK_FIELDThe posted field that carries a form's encoded Message, for the server fallback.
FOLDKIT_APP_ATTRIBUTEThe attribute Foldkit's server stamps on an application's root, as foldkit/experimental/server exports it. Written out here so a page can find its root…
KEEP_ATTRIBUTEThe attribute on a field whose typing before boot is kept (KeepTyped), naming the binding whose Message replays it.
META_ATTRIBUTEMarks each head element a plan's meta wrote, so the browser can replace them.
RESUME_ATTRIBUTEThe attribute on the stamped root that carries a page's resume envelope. Foldkit pairs its own handoff the same way: the build id rides on the root beside…
SLOT_ATTRIBUTEThe attribute on a placement's root naming its slot, while the server renders.
STATIC_ATTRIBUTEThe attribute on a static region's element, naming the region.
UNTIL_LIMIT_MSThe longest a served page waits on the runtime: for a fresh application to satisfy until, and for the runtime's chunk to answer a press the loader holds,…

Classes

ResumeRefusedWhy a page's resume envelope was refused.

Interfaces

BundleUnloadedA lazy bundle whose bodies did not load; the runtime boots without them.
CachedPageDiffersA kept page drawn otherwise for the request it served (SSR.entry's cache.check): the render read something of the request, or anything else that differs…
DecodedBindingA binding decoded from the page: its Message is one of the application's.
DiagnosticA fallback, refusal or swallowed failure, as the package that met it reports it. A package's own variants extend this with a literal _tag and the typed…
HandlerUnnamedA handler the page cannot name, so its event waits for the live runtime. Reported once per process.
HeadNotMovedA served page whose head markup (a plan's meta) was still in its body: the host's document renderer is not wrapped in SSR.headed, so link previews and…
LoadableWhat SSR needs of a lazy bundle: Bundle.lazy gives it.
MetaWhat a page says of itself beyond Foldkit's Document (title, lang, dir, canonical, ogUrl): what a search result and a link preview show. title is the…
PageContainedA served page the browser contained instead of resuming: it stays in view, inert, and no runtime starts.
PageFailedA request answered 500: its headers threw, or its page could not be rendered.
ResumableConfigThe part of a Foldkit application config a server render and a resumed client need. The full makeApplication config fits, whichever of its four shapes, and…
ResumePartA package's contribution to the envelope, for state the plan's slice cannot carry, such as Remote's normalized store. On the server capture takes what the…
ResumePlanWhich part of the Model the browser owns, and what it starts from.
StaticRegionMissingA static region the browser asked for that the server's page did not hold, rendered in the browser.
UnnamedHandlerAn element whose handler for event is a function, which the page cannot describe.

Types

PlanSurfaceOne entry of a resume plan's surfaces: a lone Surface, or a Surface.each family.
ReportDiagnosticWhere diagnostics go. It should not fail; when it does, Diagnostics.report logs that it did.
ResumableBuilderThe resumable builder for a view whose Messages are Message: its elements and attributes, and the hole forms of the four value events. One shape whether it…
SsrDiagnosticEvery diagnostic SSR reports.
Start