问题
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"?
回答1:
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:
The first desktop integration features made an appearance. These included popup notifications and dock badging. A special JavaScript file called webapp.js contains Prism-specific code for customizing a web app.
You can read on on the Prism Wiki:
Prism is available as an extension for Firefox 3 or as a standalone application.
And from the FAQ:
Prism is the codename for the project, and if the functionality provided by Prism becomes a product or is integrated into other products (like Firefox), then it won't necessarily continue to be called by this codename.
回答2:
It seems that Web Notifications will land in FireFox (Aurora 22) as well. IE10 and even Safari6 are currently missing the party.
回答3:
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.
回答4:
Tab notifier adds this feature and works great.
回答5:
I've also found this gs script: https://github.com/jhdxr/userscript-html-desktop-notification It seems to require scriptish to work!
来源:https://stackoverflow.com/questions/3003857/gecko-firefox-support-for-html5-notifications