Luxar Viewer API Documentation - v2026.9.22
    Preparing search index...

    Options for openContextMenu.

    interface ContextMenuOptions {
        x: number;
        y: number;
        ariaLabel: string;
        items: ContextMenuItem[];
        onClose?: () => void;
        restoreFocus?: HTMLElement | null;
    }
    Index
    x: number
    y: number
    ariaLabel: string
    onClose?: () => void

    Called exactly once, after the menu is torn down (any close path).

    restoreFocus?: HTMLElement | null

    Element to return focus to on close. Defaults to the element focused at open time — right for the keyboard path, but a mouse right-click does not reliably focus its target first, so a caller with a known opener should pass it explicitly.