Skip to content

pantoken-root / 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