Organiza tus páginas con colecciones
Guarda y categoriza el contenido según tus preferencias.
blockly > ContextMenuRegistry > registrar
Registra un RegistryItem.
Signature:
register(item: RegistryItem): void;
Parámetros
| Parámetro |
Tipo |
Descripción |
| elemento |
RegistryItem |
Elemento del menú contextual para registrar. |
Muestra:
void
Excepciones
{Error}, si ya existe un elemento con el ID proporcionado.
Salvo que se indique lo contrario, el contenido de esta página está sujeto a la licencia Atribución 4.0 de Creative Commons, y los ejemplos de código están sujetos a la licencia Apache 2.0. Para obtener más información, consulta las políticas del sitio de Google Developers. Java es una marca registrada de Oracle o sus afiliados.
Última actualización: 2025-07-25 (UTC)
[null,null,["Última actualización: 2025-07-25 (UTC)"],[],["The `ContextMenuRegistry.register()` method adds a `RegistryItem` to the context menu. It accepts one parameter, `item`, which represents the context menu item being registered. This method returns nothing (`void`). If a menu item with the same ID already exists, the method throws an `Error`. The core action is the registration of a context menu item for later use.\n"]]