javascript - 跨所有浏览器的通知

标签 javascript html browser notifications web-notifications

有没有适用于所有主流浏览器的通知系统?我知道 chrome 有他们的 Notification API,Safari 有推送通知,IE 有固定网站,但是有没有更通用的方式来显示通知?我确实找到了 https://github.com/ttsvetko/HTML5-Desktop-Notifications它结合使用了不同的通知(尽管我似乎仍然无法在 IE 中运行该演示)。

最佳答案

Are there any sort of notification system that works with all major browsers?

机制https://notifications.spec.whatwg.org/ defines 是 Web 应用程序的唯一标准通知系统,旨在在所有浏览器中以相同的方式工作。当前所有主要浏览器都支持它:Firefox、Safari、Chrome 和所有其他基于 Chrome 的浏览器。

https://developer.mozilla.org/docs/Web/API/Notifications_API/Using_the_Notifications_API

关于javascript - 跨所有浏览器的通知,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31684804/

相关文章:

html - 是否可以在网格中的每个元素下放置按钮?

javascript - Android 浏览器在文件输入保存时崩溃

ajax - 如何验证浏览器是否可以访问某个域?

javascript - 过滤数组 JavaScript 的对象

将网络摄像头/相机视频流上传到服务器的 HTML5 解决方案

javascript - 如何在石头剪刀布游戏中添加图像

JavaScript 错误 Uncaught SyntaxError : Unexpected identifier

android - 在 Android (Samsung Tab 2) 浏览器上替代 ☐ 和 ☒

javascript - DataMaps.js - 网络天气 map (入站和出站弧线)

javascript - Ajax (XMLHttpRequest) 对象在使用后会清理吗?