Skip to content

pantoken-root / formats/interactions/src / initModal

Functie: initModal() ​

initModal(host, dialog, onCommand): void

Sluit een CSS <dialog class="instui-modal"> of de shadow van een webcomponent <dialog> aan op het open attribuutprotocol en --show/--close/--toggle commando-routering. Beide gebruiksvormen geven dezelfde interface door:

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

Parameters ​

host ​

HTMLElement

dialog ​

HTMLDialogElement

onCommand ​

OnCommand

Retourneert ​

void