Skip to content

pantoken-root / formats/interactions/src / initModal

Swyddogaeth: initModal() ​

initModal(host, dialog, onCommand): void

Gwnewch wifrau i CSS <dialog class="instui-modal"> neu gysgod cydran gwe <dialog> i'r protocol eiddo open a'r --show/--close/--toggle llwybr gorchymyn. Mae'r ddau ddefnydd yn pasio'r un rhyngwyneb:

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

Paramedrau ​

host ​

HTMLElement

dialog ​

HTMLDialogElement

onCommand ​

OnCommand

Yn dychwelyd ​

void