--- title: Notification.onclose slug: Web/API/notification/onclose tags: - API - API Notifications - Notification - Notifications - Propriété - Reference - onclose translation_of: Web/API/Notification/onclose ---
{{APIRef("Web Notifications")}}{{AvailableInWorkers}}{{securecontext_header}}
La propriété onclose
de l'interface {{domxref ("Notification")}} définit un écouteur d'événements pour recevoir les événements {{domxref ("HTMLDialogElement/close_event", "close")}}. Ces événements se produisent lorsqu'une {{domxref ("Notification")}} est fermée.
Notification.onclose = function(event) { ... } Notification.onclose = (event) => { ... }
{{Compat("api.Notification.onclose")}}