JavaScript contextmenu

Quick reference



Initialization options

Property Description
items: Array of objectsArray of item object descriptions.
onclick: functionGlobal onclick event. function(instance, event)


Item options

Property Description
type: string Context menu item type: line | divisor | default
icon: string Context menu icon key. (Material icon key icon identification)
id: string HTML id property of the item DOM element
disabled: boolean The item is disabled
onclick: function Specific onclick event for the element.
shortcut: string A short description or instruction for the item. Normally a shortcut.
submenu: Array of objects Submenu items