Notification.renotify

这篇翻译不完整。请帮忙从英语翻译这篇文章

Note: 此特性在 Web Worker 中可用。

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

renotifyNotification 接口的只读属性,如果有新的通知替换了一个旧的通知,这个属性指明用户是否应该重新收到通知。它也可以通过Notification() 构造函数的 renotify option 来指定。

语法

var renotify = Notification.renotify;

Boolean. 默认为false;设为 true 将会重新通知用户。

例子

以下代码片段用于在一个通知被替换以后触发通报以重新通知用户;它创建一个简单的 options 对象,然后使用Notification() 构造函数触发通报。

var options = {
  body: 'Do you like my body?',
  renotify: true
}

var n = new Notification('Test notification',options);

n.renotify // should return true

规范

规范 状态 备注
Notifications API
renotify
Living Standard Living standard

浏览器兼容性

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
renotifyChrome Full support 50Edge No support NoFirefox No support NoIE No support NoOpera Full support 37Safari No support NoWebView Android No support NoChrome Android Full support 50Firefox Android No support NoOpera Android Full support 37Safari iOS No support NoSamsung Internet Android Full support Yes

Legend

Full support  
Full support
No support  
No support

参见

文档标签和贡献者

此页面的贡献者: earthengine
最后编辑者: earthengine,