Encuesta de investigación: Cuéntanos sobre tu experiencia con Blockly
Comenzar encuesta
blockly > Bloquear > desecho
Método Block.dispose()
Elimina este bloque.
Signature:
dispose(healStack?: boolean): void;
Parámetros
Parámetro |
Tipo |
Descripción |
healStack |
boolean |
(Opcional) Si es verdadero, intenta corregir los vacíos conectando la siguiente declaración con la anterior. De lo contrario, elimina todos los elementos secundarios de este bloque. |
Muestra:
void
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: 2024-08-21 (UTC)
[null,null,["Última actualización: 2024-08-21 (UTC)"],[[["The `dispose()` method permanently removes a block from the workspace."],["It optionally takes a boolean argument, `healStack`, to determine whether to connect the surrounding blocks or dispose of all the block's children."],["By default, `healStack` is false, resulting in the removal of the block and all its nested components."],["When `healStack` is true, it attempts to maintain workspace continuity by connecting the preceding and succeeding blocks."]]],["The `Block.dispose()` method removes a block. It accepts an optional boolean parameter, `healStack`. If `healStack` is true, the method attempts to connect the next statement to the previous one, filling any gaps. If `healStack` is false or omitted, all child blocks of the disposed block are also removed. The method does not return any value.\n"]]