Edit this page

up.layer up:layer:dismissed
DOM event

This event is emitted after a layer was dismissed.

The event is emitted on the layer's when the close animation is starting. If the layer has no close animaton and was already removed from the DOM, the event is emitted a second time on the document.

Tip

To prevent a layer from being closed, listen to up:layer:dismiss instead.

Closing overlays


Event properties

event.layer
required

The layer that was closed.

[event.value]
optional

The overlay's final dismissal value.

any
[event.origin]
optional

The element that caused the layer to close.

Will be undefined if the overlay was not closed by a user interacting with an element.

[event.response]
optional

The server response that caused this overlay to close.

Will be undefined if the overlay was not closed in reaction to a server response.

See Using the discarded response.