@tinyactors/scxmljs
    Preparing search index...

    Interface SessionOptions

    Options for createSession() and the Session constructors.

    interface SessionOptions {
        clock?: Clock;
        data?: Record<string, unknown>;
        datamodel?: DataModelFactory;
        domParser?: DOMParserLike;
        elementEvents?: boolean;
        invokers?: Record<string, Invoker>;
        ioprocessors?: IOProcessor[];
        loader?: Loader;
        maxMicrosteps?: number;
        memoryLimitBytes?: number;
        reflect?: boolean | ReflectOptions;
        scriptTimeoutMs?: number;
        sessionId?: string;
    }
    Index

    Properties

    clock?: Clock

    Where time comes from: realClock (default), a VirtualClock for tests, a PlaybackClock for UIs.

    data?: Record<string, unknown>

    Initial values overriding <data> of the same id (the host's or the invoker's params).

    datamodel?: DataModelFactory

    The ECMAScript engine. Set by the entry point you import: sandboxed (QuickJS/WebAssembly) from @tinyactors/scxmljs, trusted (the host's own engine) from @tinyactors/scxmljs/trusted. Invoked children inherit it.

    domParser?: DOMParserLike

    Needed to parse SCXML given as text (invoke src/srcexpr/content expressions). Defaults to the global DOMParser.

    elementEvents?: boolean

    Dispatch bubbling scxml:exit, scxml:transition, scxml:enter and scxml:done events on the chart's own source elements. Off by default: sessions sharing one model would share its elements.

    invokers?: Record<string, Invoker>

    Handlers for <invoke> types other than SCXML.

    ioprocessors?: IOProcessor[]

    Event I/O Processors in addition to the built-in SCXML one.

    loader?: Loader

    Resolves src attributes (<script>, <data>, <invoke>). May return synchronously.

    maxMicrosteps?: number

    Stop after this many microsteps in one macrostep, to keep a UI responsive (default 100000).

    memoryLimitBytes?: number

    Memory limit of the session's QuickJS context, in bytes (default 64 MiB). Sandboxed data model only.

    reflect?: boolean | ReflectOptions

    Keep data-active, data-enabled, data-fired, data-initial and data-status attributes on the source elements in sync, for CSS. Off by default.

    scriptTimeoutMs?: number

    Interrupt a single evaluation after this many ms (default 2000). Sandboxed data model only.

    sessionId?: string

    The session's id (_sessionid, and the #_scxml_<id> address). Default: generated and unique.