foo-webview-sdk
    Preparing search index...

    Interface MenuRunContextCommandByIdParams

    Parameters for menu.runContextCommandById. Run the context-menu item whose commandId a menu.getContextMenu call reported. The menu is rebuilt from mode and handles, so pass the handles that call used and the mode it reported, not auto again. An id is a position in the rebuilt menu, not a name: an id past its end fails with NOT_FOUND, but when the tracks, the selection, the playing track or the installed components changed since, the same id can run another item without failing. Pass expectPath and expectTarget together to rule that out: the host then runs the item only when the rebuilt menu matches what that call reported, and otherwise fails without running anything, with details.reason set: NOT_FOUND (targetChanged, commandChanged), MENU_MATCH_AMBIGUOUS (ambiguousPath), MENU_ITEM_DISABLED (disabled), or NOT_SUPPORTED (unsupportedTargetMode) for mode: "playlist". Reopen the menu after such a failure. The call answers when the command returns: one that shows a modal dialog answers only after the dialog closes.

    interface MenuRunContextCommandByIdParams {
        expectPath?: string;
        expectTarget?: string;
        handles?: JsonValue[];
        id: number;
        mode?: string;
    }
    Index
    expectPath?: string

    The node's path as menu.getContextMenu reported it. Give it with expectTarget: the item at id must have this path, and no other node may share it.

    expectTarget?: string

    The targetKey that menu.getContextMenu reported. Give it with expectPath: the tracks resolved now must give the same key.

    handles?: JsonValue[]

    The handles the menu was built with; see menu.getContextMenu.

    id: number

    The commandId of a context-menu node.

    mode?: string

    The mode the menu was built with; see menu.getContextMenu.

    "auto"