Heroic Lands Heroic Lands
Home Thalorna Blog
Projects
Song of Heroic Lands HârnMaster 3 Modules API Documentation KnowledgeBase
License
  • Preparing search index...
  • The search index is not available
Song of Heroic Lands API - v0.8.2
  • Song of Heroic Lands API
  • sohl
  • apps
  • logic
  • compileMenuEntry

Function compileMenuEntry

  • compileMenuEntry(
        entry: ContextMenuEntry | ContextMenuEntryContext,
        parent?: SohlLogic,
    ): CompiledMenuEntry
  • Normalize a context-menu entry into the CompiledMenuEntry shape Foundry's ContextMenu base class expects: the authored condition is compiled to a visible predicate (via compileCondition) and the legacy condition key is dropped, and a default callback is generated from functionName when no explicit one is supplied.

    Kept here (Foundry-free) rather than inline in SohlContextMenu so the boundary transform — and its avoidance of Foundry's deprecated condition key — is unit-testable without a live ContextMenu.

    Parameters

    • entry: ContextMenuEntry | ContextMenuEntryContext

      The authored entry (raw context or a ContextMenuEntry).

    • Optionalparent: SohlLogic

      The owning document's logic, used to compile a string (SafeExpression) condition.

    Returns CompiledMenuEntry

    The compiled entry keyed for Foundry's ContextMenu.

    Throws

    If the entry has neither a callback nor a functionName.

    • Defined in src/apps/logic/ContextMenuEntry.ts:160

Settings

Member Visibility
Song of Heroic Lands API - v0.8.2
  • Loading...

Generated using TypeDoc with typedoc-github-theme

© 2020–2026 Tom Rodriguez. Content under The World of Thalorna and Song of Heroic Lands is licensed under CC BY-SA 4.0; all other content is © Tom Rodriguez, all rights reserved. See License.

CC BY-SA 4.0 Discord