mirror of
https://github.com/google/blockly.git
synced 2026-01-04 15:40:08 +01:00
feat: add custom context menu rendering (#7409)
This commit is contained in:
@@ -137,7 +137,7 @@ export namespace ContextMenuRegistry {
|
||||
export interface RegistryItem {
|
||||
callback: (p1: Scope) => void;
|
||||
scopeType: ScopeType;
|
||||
displayText: ((p1: Scope) => string) | string;
|
||||
displayText: ((p1: Scope) => string | HTMLElement) | string | HTMLElement;
|
||||
preconditionFn: (p1: Scope) => string;
|
||||
weight: number;
|
||||
id: string;
|
||||
@@ -147,7 +147,7 @@ export namespace ContextMenuRegistry {
|
||||
* A menu item as presented to contextmenu.js.
|
||||
*/
|
||||
export interface ContextMenuOption {
|
||||
text: string;
|
||||
text: string | HTMLElement;
|
||||
enabled: boolean;
|
||||
callback: (p1: Scope) => void;
|
||||
scope: Scope;
|
||||
|
||||
Reference in New Issue
Block a user