mj-context-menu
Version:
A generic context menu
19 lines (18 loc) • 672 B
TypeScript
import { AbstractItem } from './abstract_item.js';
import { Menu } from './menu.js';
import { ParserFactory } from './parser_factory.js';
export declare class Command extends AbstractItem {
private command;
static fromJson(_factory: ParserFactory, { content: content, action: action, id: id }: {
content: string;
action: (node: HTMLElement) => void;
id: string;
}, menu: Menu): Command;
constructor(menu: Menu, content: string, command: (node: HTMLElement) => void, id?: string);
mousedown(event: MouseEvent): void;
mouseup(event: MouseEvent): void;
executeAction(): void;
toJson(): {
type: string;
};
}