HeadlessCanvasHost
A mounted document: its scenes and environments, the shared session store and the semantic diagnostics.
@internote/canvas-sdk/hostOn this page
import { HeadlessCanvasHost } from '@internote/canvas-sdk/host';#Fields
datasetsThe document's
@data datasets, by id, for consumers that bind one.Record<string, ChalkDataset>dbThe durable per-reader store the host was given — the same one
session+db environments receive — or a store that keeps nothing. Blank content that keeps a reader's work, such as a question's answers, reads and writes it here.KeyValueStoragediagnosticsWhat the canvas semantic pass reported about the document.
SemanticPassResultdisposeDetaches every runtime from its step controller and clears the session store.
voidenvironmentByIdReturns the environment with an id, the author's
#id or else its instance id, or undefined.HeadlessEnvironment | undefinedfocusEnvironmentFocuses one environment, or none, so it alone owns the keyboard.
voidsceneAtReturns the scene at an index, and throws when there is none there.
HeadlessScenescenesEvery
scene in the document body, in order.HeadlessScene[]sessionThe session store behind every environment's session tier.
SessionStoresetPresentingSets
isPresenting on every environment's context.voidDeclared in packages/canvas-sdk/src/host/headless.ts:224.