toolmark-monorepo / @toolmark/core / AnchorSpec
Interface: AnchorSpec
Defined in: packages/core/src/tool.ts:40
Where a tool can be pointed at on the page (tour hooks, spec §13), read through tm.anchor. With a param, tm.anchor tries a tm.setAnchor override, then params[param], then resolve(param), then gives null; without one, an override, then element(), then null. Any Element works, including SVG and custom elements.
Properties
element?
optionalelement?: () =>Element|null
Defined in: packages/core/src/tool.ts:42
The tool's element.
Returns
Element | null
params?
optionalparams?:Record<string, () =>Element|null>
Defined in: packages/core/src/tool.ts:44
Per-parameter elements, keyed by input path (own keys only).
resolve?
optionalresolve?: (param) =>Element|null
Defined in: packages/core/src/tool.ts:49
Fallback for params not in params (or whose params entry returned null), e.g. dynamic array paths such as items.2.qty.
Parameters
param
string
Returns
Element | null