Notification: sự kiện close

Limited availability

This feature is not Baseline because it does not work in some of the most widely-used browsers.

Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.

Note: This feature is available in Web Workers.

Sự kiện close của giao diện Notification được phát ra khi một Notification được đóng.

Cú pháp

Dùng tên sự kiện trong các phương thức như addEventListener(), hoặc đặt thuộc tính trình xử lý sự kiện.

js
addEventListener("close", (event) => { })

onclose = (event) => { }

Kiểu sự kiện

Một Event tổng quát.

Thông số kỹ thuật

Specification
Notifications API
# dom-notification-onclose

Tương thích trình duyệt

Xem thêm