Build the lazy evaluation context for a context-menu condition.
target is always the HTMLElement the menu was triggered on.
itemLogic is the logic layer of the nearest ancestor row's
data-item-id item resolved on the owning actor (or undefined if
not found).
actorLogic is the logic layer of the nearest ancestor row's
data-actor-id actor (or undefined).
Conditions bind the logic layer, not the raw documents — the logic
object is the stable, computed view authors write against (matching the
action trigger/visibility and Active Effect predicate conventions). The
resolved row may not be an item/actor row, so itemLogic/actorLogic
can be absent — authors guard with defined(...).
itemLogic and actorLogic are getters, so the DOM walk and lookup
happen only when the condition actually references them.
Parameters
target: HTMLElement
The HTMLElement the context menu was opened on.
Returns Record<string,unknown>
A context object with target, itemLogic, and actorLogic
bindings.
Build the lazy evaluation context for a context-menu condition.
targetis always the HTMLElement the menu was triggered on.itemLogicis the logic layer of the nearest ancestor row'sdata-item-iditem resolved on the owning actor (orundefinedif not found).actorLogicis the logic layer of the nearest ancestor row'sdata-actor-idactor (orundefined).Conditions bind the logic layer, not the raw documents — the logic object is the stable, computed view authors write against (matching the action trigger/visibility and Active Effect predicate conventions). The resolved row may not be an item/actor row, so
itemLogic/actorLogiccan be absent — authors guard withdefined(...).itemLogicandactorLogicare getters, so the DOM walk and lookup happen only when the condition actually references them.