Skip to content

pantoken / 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