Skip to content

@jsvision/ui / ModalHostAware

Interface: ModalHostAware

Defined in: ui/src/event/types.ts:31

Implement this on a view to opt into self-closing modality. When such a view is opened with EventLoop.execView, the loop injects a ModalHost via attachModalHost before the modal opens, so the view can later close itself. Views that do not implement it (the common case) are opened as plain modals and closed by an external endModal call.

Methods

attachModalHost()

attachModalHost(host): void

Defined in: ui/src/event/types.ts:33

Receive the loop's modal-host handle when this view is opened via execView.

Parameters

host

ModalHost

Returns

void