foo-webview-sdk
    Preparing search index...

    Type Alias MenuCommand

    MenuCommand: Omit<
        MenuTreeNode,
        "type"
        | "children"
        | "availability"
        | MenuNodeLabelKey
        | "available",
    > & Required<Pick<MenuTreeNode, MenuNodeLabelKey | "available">> & {
        type: "command";
    }

    Menu command — invokable leaf node.

    flags and commandId depend on the menu tier. The v2 tree and the v1 HMENU tier emit both, but flags means different bits on each: raw SDK display flags on the v2 tree, raw Win32 MENUITEMINFO state bits on the HMENU tier. The flat fallback tier (fallback: true) emits flags and no commandId, because it enumerates commands without creating a menu. Check these optional fields before using them.

    guid is the ONLY stable way to run the command. commandId is a Win32 menu id that dies with the transient menu it was generated from, so it must never be persisted or passed back as an address.

    Main-menu source reflects the provider's node kind; a dynamic leaf without its subGuid remains dynamic and cannot be executed. Context-menu sources distinguish dynamic leaves by subGuid presence. Every leaf of the v1 HMENU tier reports hmenu_fallback whether or not a subGuid was back-filled for it.