This event is emitted before a layer is dismissed.
The event is emitted on the element of the layer that is about to close.
The layer that is about to close.
The element that is causing the layer to close.
Event listeners may call this method to prevent the overlay from closing.