Type alias MenuItemTemplate

MenuItemTemplate: {
    checked?: boolean;
    data?: any;
    enabled?: boolean;
    icon?: string;
    label?: string;
    role?: "cut" | "copy" | "paste" | "toggleDevTools" | "reload";
    submenu?: MenuItemTemplate[];
    type?: "normal" | "separator" | "submenu" | "checkbox";
    visible?: boolean;
}

Type declaration

  • Optional checked?: boolean

    Should only be specified for checkbox type menu items.

  • Optional data?: any

    Data to be returned if the user selects the element. Must be serializable

  • Optional enabled?: boolean

    If false, the menu item will be greyed out and unclickable.

  • Optional icon?: string

    Image Data URI with image dimensions inferred from the encoded string

  • Optional label?: string
  • Optional role?: "cut" | "copy" | "paste" | "toggleDevTools" | "reload"
  • Optional submenu?: MenuItemTemplate[]

    Should be specified for submenu type menu items. If submenu is specified, the type: 'submenu' can be omitted.

  • Optional type?: "normal" | "separator" | "submenu" | "checkbox"

    Can be normal, separator, submenu, or checkbox. Defaults to 'normal' unless a 'submenu' key exists

  • Optional visible?: boolean

    If false, the menu item will be entirely hidden.

Generated using TypeDoc