blockly > ContextMenuRegistry > getItem
Signature :
getItem(id: string): RegistryItem | null;
Paramètres
Paramètre |
Type |
Description |
id |
chaîne |
ID de l'élément RegistryItem à obtenir. |
Renvoie :
RegistryItem | nul
RegistryItem, ou valeur "null" si introuvable
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2024/09/12 (UTC).
[null,null,["Dernière mise à jour le 2024/09/12 (UTC)."],[[["The `ContextMenuRegistry.getItem()` method retrieves a specific context menu item by its unique ID."],["If an item with the provided ID exists within the registry, the method returns the corresponding `RegistryItem`; otherwise, it returns `null`."],["This method is useful for accessing and potentially modifying or removing specific context menu items based on their ID."]]],["The `getItem()` method, part of the `ContextMenuRegistry`, retrieves a `RegistryItem` by its unique ID. It accepts a string `id` as a parameter, representing the target item's identifier. The method then returns the corresponding `RegistryItem` if found, or `null` if no item matches the provided ID.\n"]]