blockly > Eventos > CommentChange > executar
Execute um evento de alteração.
Signature:
run(forward: boolean): void;
Parâmetros
Parâmetro |
Tipo |
Descrição |
encaminhar |
booleano |
Verdadeiro se executado para frente, falso se executado para trás (desfazer). |
Retorna:
void
Exceto em caso de indicação contrária, o conteúdo desta página é licenciado de acordo com a Licença de atribuição 4.0 do Creative Commons, e as amostras de código são licenciadas de acordo com a Licença Apache 2.0. Para mais detalhes, consulte as políticas do site do Google Developers. Java é uma marca registrada da Oracle e/ou afiliadas.
Última atualização 2024-08-29 UTC.
[null,null,["Última atualização 2024-08-29 UTC."],[[["The `run()` method executes a CommentChange event, modifying a block's comment."],["It accepts a boolean `forward` parameter, indicating whether the event should be applied (forward) or reversed (backward/undo)."],["Calling `run()` with `forward` set to `true` applies the comment change, while setting it to `false` undoes the change."]]],["The `Events.CommentChange.run()` method executes a comment change event. It accepts a boolean parameter, `forward`, which determines the direction of the operation. When `forward` is true, the change is applied; when false, the change is undone. The method does not return any value (void). This method is essential for both implementing changes and enabling the undo functionality for comment edits.\n"]]