Variable ESCAPE_EVENT_NAMEConst

ESCAPE_EVENT_NAME: "inpost.geowidget.escape" = 'inpost.geowidget.escape'

Name of the DOM event dispatched on the <inpost-geowidget> element when the user presses Escape inside the widget and the widget has nothing of its own left to close (e.g. point details). Host pages that show the widget in a modal dialog should listen for it and close the dialog (WCAG 2.1.2 / dialog pattern), because key presses inside the widget iframe do not reach the host page. The event bubbles and has no detail.

document.querySelector('inpost-geowidget')
.addEventListener('inpost.geowidget.escape', () => closeMyModal());

Generated using TypeDoc