блочный > ContextMenuRegistry > RegistryItem > обратный вызов
Подпись:
callback: (scope: Scope, e: PointerEvent) => void;
,
блочный > ContextMenuRegistry > RegistryItem > обратный вызов
Подпись:
callback: (scope: Scope, e: PointerEvent) => void;
Если не указано иное, контент на этой странице предоставляется по лицензии Creative Commons "С указанием авторства 4.0", а примеры кода – по лицензии Apache 2.0. Подробнее об этом написано в правилах сайта. Java – это зарегистрированный товарный знак корпорации Oracle и ее аффилированных лиц.
Последнее обновление: 2025-01-08 UTC.
[null,null,["Последнее обновление: 2025-01-08 UTC."],[[["`callback` is a property of `RegistryItem` in Blockly's ContextMenuRegistry."],["It's a function that gets executed when a context menu item is triggered."],["The function receives the `scope` (likely the related block or workspace) and the `PointerEvent` that triggered the context menu as arguments."],["Its purpose is to define the action performed when the context menu item is selected."]]],["The `callback` property within the `ContextMenuRegistry.RegistryItem` interface is defined. It is a function that takes two arguments: `scope` and `e` (a `PointerEvent`). This function, when called, returns nothing (`void`). This property represents a function to be executed within a certain scope upon a pointer event.\n"]]