SpreadJS Documentation
getCommandOptions Method
GC.Spread.Sheets.ContextMenu Namespace > MenuView type : getCommandOptions Method
the container of the menu item which be clicked
the mouse click event
get command options of specified menu item
Syntax
var instance = new GC.Spread.Sheets.ContextMenu.MenuView();
var value; // Type: Object
value = instance.getCommandOptions(menuItemData, host, event);
function getCommandOptions( 
   menuItemData : Object,
   host : HTMLElement,
   event : Object
) : Object;

Parameters

menuItemData
the data of the menu item which be clicked
host
the container of the menu item which be clicked
event
the mouse click event
Example
var spread = new GC.Spread.Sheets.Workbook(document.getElementById("ss"));
  function CustomMenuView() {
  }
  CustomMenuView.prototype = new GC.Spread.Sheets.ContextMenu.MenuView();
  CustomMenuView.prototype.getCommandOptions = function (menuItemData, host, event) {
     if (menuItemData && menuItemData.name === "markWithABg") {
         var ele = event.target || event.srcElement;
         if (ele.className.indexOf("colorpicker-div-inner-colorcell") !== -1) {
             ele = ele.parentElement;
         }
         return ele.style.background;
     }
  };
See Also

Reference

MenuView type