blockly > dialog > confirm

dialog.confirm() 函式

應用程式開發人員可透過 setConfirm 覆寫 window.confirm() 的包裝函式,提供模式瀏覽器視窗的替代方案。

Signature:

export declare function confirm(message: string, callback: (result: boolean) => void): void;

參數

參數 類型 說明
訊息 字串 要向使用者顯示的訊息。
callback (result: boolean) => void 用於處理使用者回應的回呼。

退貨:

void