Skip to content

pantoken-root / formats/interactions/src / initModal

Função: initModal() ​

initModal(host, dialog, onCommand): void

Conecte um <dialog class="instui-modal"> de CSS ou o shadow de um componente web <dialog> ao protocolo de atributo open e ao roteamento de comandos --show/--close/--toggle. Ambas as utilizações passam a mesma interface:

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

Parâmetros ​

host ​

HTMLElement

dialog ​

HTMLDialogElement

onCommand ​

OnCommand

Retorna ​

void