Notification: thuộc tính requireInteraction

Khả dụng hạn chế

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.

Thuộc tính chỉ đọc requireInteraction của giao diện Notification trả về giá trị boolean cho biết thông báo phải còn hoạt động cho đến khi người dùng bấm hoặc đóng nó, thay vì tự động biến mất.

Note: Thuộc tính này có thể được đặt ngay khi tạo thông báo bằng cách đặt tùy chọn requireInteraction thành true trong object tùy chọn của constructor Notification().