ダイアログ.prompt() 関数
window.prompt() へのラッパー。アプリ デベロッパーが setPrompt を介してオーバーライドすることで、モーダル ブラウザ ウィンドウの代替情報を提供できます。組み込みのブラウザ プロンプトは、モバイル デバイスでのテキスト入力を改善するためによく使用されます。これをオーバーライドする場合は、モバイルでテストすることを強くおすすめします。
署名:
export declare function prompt(message: string, defaultValue: string, callback: (p1: string | null) => void): void;
パラメータ
パラメータ | 種類 | 説明 |
---|---|---|
message | string | ユーザーに表示するメッセージ。 |
defaultValue | string | プロンプトの初期化に使用する値。 |
callback | (p1: string | null) => void | ユーザーのレスポンスを処理するためのコールバック。 |
戻り値:
void