MenuItemCollection() method

This class represents a collection of menu items.

Syntax

<static> MenuItemCollection()

Example

// This is the function we'll use as a callback for the first menu item.
var callback = function()
{
   alert( "You clicked the first menu item!" );
}

// This is the function we'll use as a callback for the second menu item.
var callback2 = function()
{
   alert( "You clicked the second menu item!" );
}

// This function creates and adds a menu item collection.
var addMenuItems = function()
{
   var menuItemCollection = new hwc.MenuItemCollection();
   menuItemCollection.addMenuItem("menu item 1", "callback()");
   menuItemCollection.addMenuItem("menu item 2", "callback2()");
   hwc.addMenuItemCollection( menuItemCollection );
}

Source

hwc-comms.js, line 554.