연구 설문조사: Blockly 사용 경험을 알려주세요
설문조사 시작
차단 > 대화상자 > setConfirm
대화상자.setConfirm() 함수
Blockly.dialog.confirm()이 호출될 때 실행될 함수를 설정합니다.
서명:
export declare function setConfirm(confirmFunction: (p1: string, p2: (p1: boolean) => void) => void): void;
매개변수
매개변수 |
유형 |
설명 |
confirmFunction |
(p1: 문자열, p2: (p1: 부울) => void) => 무효 |
실행할 함수입니다. |
반환:
void
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2024-08-22(UTC)
[null,null,["최종 업데이트: 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"]]