Skip to content

pantoken-root / formats/interactions/src / initModal

Fonksiyon: initModal() ​

initModal(host, dialog, onCommand): void

Bir CSS <dialog class="instui-modal"> veya bir web bileşeninin shadow <dialog> öğesini open öznitelik protokolüne ve --show/--close/--toggle komut yönlendirmesine bağlayın. Her iki kullanım da aynı arabirimi geçirir:

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

Parametreler ​

host ​

HTMLElement

dialog ​

HTMLDialogElement

onCommand ​

OnCommand

Döndürür ​

void