Skip to content

pantoken / formats/interactions/src / initModal

関数: initModal()

initModal(host, dialog, onCommand): void

CSS の <dialog class="instui-modal"> またはウェブコンポーネントの shadow <dialog>open 属性プロトコルと --show/--close/--toggle コマンドルーティングに接続します。両方の使用法は同じインターフェースを渡します:

  • CSS: host === dialog (the dialog itself carries the id and open attr)
  • WC: host = custom element, dialog = its shadow &lt;dialog&gt;

パラメーター

host

HTMLElement

dialog

HTMLDialogElement

onCommand

OnCommand

戻り値

void