Skip to content

pantoken-root / formats/interactions/src / initModal

फंक्शन: initModal() ​

initModal(host, dialog, onCommand): void

CSS <dialog class="instui-modal"> या एक वेब घटक के शैडो <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