blockly > okno > setConfirm
Funkcja dialog.setConfirm()
Ustawia funkcję wywoływaną po wywołaniu Blockly.dialog.confirm().
Podpis:
export declare function setConfirm(confirmFunction: (p1: string, p2: (p1: boolean) => void) => void): void;
Parametry
Parametr |
Typ |
Opis |
confirmFunction |
(p1: ciąg, p2: (p1: wartość logiczna) => void) => nieważne |
Funkcja do uruchomienia. |
Zwroty:
nieważne
O ile nie stwierdzono inaczej, treść tej strony jest objęta licencją Creative Commons – uznanie autorstwa 4.0, a fragmenty kodu są dostępne na licencji Apache 2.0. Szczegółowe informacje na ten temat zawierają zasady dotyczące witryny Google Developers. Java jest zastrzeżonym znakiem towarowym firmy Oracle i jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2024-08-22 UTC.
[null,null,["Ostatnia aktualizacja: 2024-08-22 UTC."],[[["The `dialog.setConfirm()` function allows you to define a custom function that will be executed when the `Blockly.dialog.confirm()` method is called."],["This custom function receives the confirmation message and a callback function as parameters, enabling you to handle user confirmation within your application logic."],["The callback function should be used to signal the user's choice (true for confirm, false for cancel) back to the Blockly dialog system."]]],["The `dialog.setConfirm()` function sets a custom function to execute when `Blockly.dialog.confirm()` is invoked. This function, passed as `confirmFunction`, takes two parameters: a string (`p1`) and a callback function (`p2`). The callback function `p2` accepts a boolean parameter. The `setConfirm()` function itself does not return any value. Its main purpose is defining the behavior of the confirmation dialog.\n"]]