Skip to content

Interface: RenderOptions

Defined in: src/renderer/render.ts:63

Options for render.

Properties

PropertyTypeDescriptionDefined in
sessionId?stringReuse an existing session's store. Pass another session's sessionId to share state between renders. If omitted, a new isolated store is created.src/renderer/render.ts:69
rpcTimeout?numberTimeout (in milliseconds) applied to browser→Node RPC round-trips for this render's page. Applied via __MW.setConfig before injection, so the last render on a given page wins. Default: 30000. Pass 0 to disable.src/renderer/render.ts:77
cleanupOthers?booleanWhen true (the default), call cleanup() on every other active render on the same target before starting this one. Renders on other targets (other tabs, other pages) are not affected. The default exists because the common case is a step replacing the previous step's UI — leaving prior renders mounted just stacks Shadow DOM hosts. Pass false when you intentionally want multiple concurrent UIs on the same page (e.g. a persistent status bar alongside a form). Mirrors the existing cleanup vocabulary: session.cleanup() is per-session, cleanupAll() is everything, and cleanupOthers sits in between — every other session on this target. Default true Example await render(ctx, StepOne()); // StepOne mounts await render(ctx, StepTwo()); // StepOne cleans up render(ctx, StatusBar(), {cleanupOthers: false}); // stacks on topsrc/renderer/render.ts:104

Matterway Assistant SDK Documentation