Notification: sự kiện error

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 error của giao diện Notification được phát ra khi có lỗi xảy ra với một Notification (trong nhiều trường hợp là lỗi khiến thông báo không thể hiển thị).

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("error", (event) => { })

onerror = (event) => { }

Kiểu sự kiện

Một Event tổng quát.

Thông số kỹ thuật

Specification
Notifications API
# dom-notification-onerror

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

Xem thêm