Edit this page

up.layer up:layer:dismiss
DOM event

This event is emitted before a layer is dismissed.

The event is emitted on the element of the layer that is about to close.


Event properties

event.layer up.Layer

The layer that is about to close.

[event.value] any optional

The overlay's dismissal value.

Listeners may replace or mutate this value.

[event.origin] Element optional

The element that is causing the layer to close.

Will be undefined if the overlay is not closing by a user interacting with an element.

[event.response] up.Response optional experimental

The server response that is causing this overlay to close.

Will be undefined if the overlay is not closing in reaction to a server response.

event.preventDefault()

Event listeners may call this method to prevent the overlay from closing.