Gecko/Firefox 对 HTML5 通知的支持
我想知道到目前为止 Gecko 浏览器中是否有对 HTML5 通知 功能的内置支持?也许是一些隐藏的开发者的东西?
我知道 WebKits window.webkitNotifications
效果很好,那么,有 Firefox 实现吗?
更新
在搜索并阅读了一些 W3C HTML5 规范后,我可能有点偏离这里。 我在那里找不到任何通知功能。我在这里面对的是错误的事实吗?这只是“自己的 webkit 实现”吗?
I'm wondering if there is any build-in support for the HTML5 Notification feature in Gecko browsers so far? Maybe some hidden developer thingy ?
I'm aware of WebKits window.webkitNotifications
which works great, so, is there a Firefox implementation ?
Update
After searching and reading some W3C HTML5 specs, I'm maybe a little bit off here.
I can't find any Notification feature anywhere there. Am I facing wrong facts here? Is that just a "very own webkit implementation"?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
首先回答第二个问题:不,这不是 WebKit 特有的功能。但是,尽管名为“html5rocks”的网站包含此内容的演示,但通知仍然不是 HTML 5 的一部分WHATWG 邮件中有关于它们的讨论。今年的列表(阅读主题为“Notification API”的消息)。 稍后的消息中再次提到了它们。
那么,我们有什么? Chromium 中的通知 API 的说明。基于 Chromium 的 API(但独立于HTML 5)。
Mozilla 提到通知是其 Prism 项目的一部分。例如,从 Prism 0.9 开始,通知是 Prism 的一部分:
您可以在 Prism Wiki 上继续阅读:
并来自常见问题解答:
To start with your second question: no, it's not a WebKit-specific feature. But although a site called ‘html5rocks’ contains a demo of this, Notifications are still not part of HTML 5. There was a discussion about them on the WHATWG mailing list this year (read the messages with subject ‘Notification API’). They are mentioned again in a later message.
So, what do we have? A description of the Notification API in Chromium. A W3C Editor's Draft of a specification, based on Chromium's API (but independent of HTML 5).
Mozilla mentioned Notifications as part of their Prism project. E.g., beginning with Prism 0.9 Notifications are a part of Prism:
You can read on on the Prism Wiki:
And from the FAQ:
看来网络通知将登陆FireFox (Aurora 22)< /a> 也是如此。 IE10 甚至 Safari6 目前缺席。
It seems that Web Notifications will land in FireFox (Aurora 22) as well. IE10 and even Safari6 are currently missing the party.
有一个名为 ff-html5notifications 的 Firefox 插件,它充当 Chrome 通知 API 之间的适配器Firefox 的内部通知 API,它再次使用各自平台上的本机通知系统(Growl、libnotify)。
请注意,在 Linux 上,非 html 通知目前仅在没有 此版本的插件。
There's a Firefox plugin called ff-html5notifications that acts as an adapter between the Chrome Notification API and Firefox' internal notification API, which then again uses native notification systems on the respective platform (Growl, libnotify).
Note that on Linux, non-html notifications are currently only working without images with this version of the plugin.
Tab notifier 添加了此功能并且效果很好。
Tab notifier adds this feature and works great.
我还发现了这个 gs 脚本:
https://github.com/jhdxr/userscript-html-desktop-notification
看来需要脚本才能工作!
I've also found this gs script:
https://github.com/jhdxr/userscript-html-desktop-notification
It seems to require scriptish to work!