Notification:renotify 属性
备注: 此特性在 Web Worker 中可用
Notification 接口的 renotify 只读属性指定在新通知替换旧通知后是否应当通知用户,在 Notification() 构造函数的 renotify 选项中指定。
值
一个布尔值。默认值为 false;设为 true 将会重新通知用户。
示例
以下代码片段用于在一个通知被替换以后触发重新向用户发送通知;它创建一个简单的 options 对象,然后调用 Notification() 构造函数触发通知。
js
const options = {
  body: "您提交的代码收到了 3 条新的审阅意见。",
  renotify: true,
};
const n = new Notification("新评论活动", options);
console.log(n.renotify); // "true"
规范
| Specification | 
|---|
| Notifications API Standard  # dom-notification-renotify  | 
浏览器兼容性
BCD tables only load in the browser