Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

AlertMode

import type { AlertMode } from "https://scrapbox.io/api/code/Mijinko/input-dialog-userscript@1.0.0/scrapboxAlert.ts";

アラートの挙動を指定するための型

interface AlertMode {
buttons: Button[];
priorityCancelButtonIndex?: number;
priorityEnterButtonIndex?: number;
}

§Properties

§
buttons: Button[]
[src]
§
priorityCancelButtonIndex?: number
[src]

キャンセル時に優先して選択されるボタンの番号(省略した場合はキャンセル操作ができない)

領域外をクリックした時やEscキーを入力した時などに使用される

§
priorityEnterButtonIndex?: number
[src]

決定時に優先して選択されるボタンの番号(既定は0)

ここで設定した値は以下の場面で使用される

  • 入力フォームでCtrl+Enterを入力したときに選択されるボタンの番号