# JavaScript menu object

The `menu` object is supported since WRT 1.0.

The `menu` object is a built-in JavaScript object in the widget engine. It is extended from the `window` object to provide widget-specific APIs for manipulating widget's options menu and softkeys.

The `menu` object can be accessed via the window object `window.menu` or just simply `menu`. Thus, in the WRT environment, the term `menu` is a reserved keyword and should not be used as a user-defined global variable name for other type of objects.

A widget's options menu can be constructed using the `menu` object. The options menu is automatically associated with the device's left softkey and it cannot be reassigned to associate with another softkey (for example, the right softkey). The label of the options menu (the left softkey) is the system-defined term in the current used system language (for example, `Options` for English). Thus, the left softkey label cannot be changed.

`menu` object methods:

- `append()`

- `remove()`

- `getMenuItemById()`

- `getMenuItemByName()`

- `setRightSoftkeyLebel()`

- `showSoftkeys()`

- `hideSoftkeys()`

- `clear()`

`menu` object property:

- `onShow`

For more general information on constructing an options menu and manipulating softkeys, see Using softkeys.