CheckboxContextMenuItem
Extends: ContextMenuItemBase
A checkbox context menu item that can be checked or unchecked, and perform an action when clicked.
import { CheckboxContextMenuItem } from '@mobrowser/api';
Example
import { ContextMenu, CheckboxContextMenuItem } from '@mobrowser/api';
const menu = new ContextMenu({
items: [
new CheckboxContextMenuItem({
label: 'Enable',
checked: true,
action: (item: CheckboxContextMenuItem) => { }
})
]
})
Properties
checked
readonly checked?: boolean;
Whether the checkbox context menu item is checked.
Methods
constructor()
constructor(options: CheckboxContextMenuItemOptions): void;
Creates a new checkbox context menu item.
| Parameter | Type | Description |
|---|---|---|
options | CheckboxContextMenuItemOptions | The options for constructing the checkbox context menu item. |