API Reference
Cinder.registerDomAdapter
Register a DOM adapter for custom controls or execution paths that are not covered well by standard browser behavior.
Need the shortest path?
Use Quick Start when you want the smallest working route → scan → graph → run flow first.
Something feels off?
Inspect scan output, graph state, active route/context, and dispatch in a practical order.
Need the full surface?
Browse all runtime methods, hooks, extension points, and lifecycle APIs.
Use registerDomAdapter() when a custom widget cannot be handled reliably through standard DOM execution.
Example
ts
10 lines
Cinder.registerDomAdapter({
id: 'custom-combobox',
match(context) {
return context.element.getAttribute('role') === 'combobox';
},
execute(context) {
context.element.dispatchEvent(new Event('click', { bubbles: true }));
return true;
},
});Adapter shape
ts
5 lines
{
id: string;
match(context): boolean;
execute(context): boolean | Promise<boolean>;
}The adapter context includes:
intentstepsnapshotnodeelementroot
When to use it
- framework-specific inputs
- headless UI components
- custom comboboxes, menus, or toggles
- any surface where tag-only standard DOM behavior is not enough
Safety note
Adapter failures are isolated by the runtime and returned as dispatch errors instead of crashing the pipeline.
Related pages
Continue reading