A context-menu entry compiled into the shape Foundry's ContextMenu base class consumes: the authored condition has become a visible predicate and a concrete callback is always present.

The visibility predicate is keyed visible, not condition: Foundry v14 deprecated ContextMenuEntry#condition in favor of #visible (removed in v16), and emitting the legacy key makes Foundry's ContextMenu log a compatibility warning on every render. See https://kb.heroiclands.org/dev/concepts/architecture/.

interface CompiledMenuEntry {
    callback: ContextMenuCallback;
    group: string;
    icon?: HTMLString;
    id: string;
    name: string;
    visible: (target: HTMLElement) => boolean;
}

Properties

Handler invoked when the entry is clicked.

group: string

Sort group the entry belongs to.

icon?: HTMLString

Pre-built HTML icon markup rendered before the label.

id: string

Unique identifier for the entry.

name: string

Display label for the entry.

visible: (target: HTMLElement) => boolean

Predicate gating whether the entry is shown (Foundry v14 #visible).