Contents

MenuItemWithRole

Extends: MenuElement

A menu item with predefined role.

import { MenuItemWithRole } from '@mobrowser/api';

Example 

import { app, Menu, MenuItemWithRole } from '@mobrowser/api';

const menu = new Menu({
  items: [
    new MenuItemWithRole({ role: 'quit' })
  ]
})
app.setMenu(menu)

Properties 

role 

readonly role: MenuItemRole;

The role of the menu item.

Methods 

constructor() 

constructor(options: MenuItemWithRoleOptions): void;

Creates a new menu item with a role.

ParameterTypeDescription
optionsMenuItemWithRoleOptionsThe options for constructing the menu item with a role.