How does one use Chrome desktop notifications? I'd like that use that in my own code.
Update: Here's a blog post explaining webkit notifications with an example.
How does one use Chrome desktop notifications? I'd like that use that in my own code.
Update: Here's a blog post explaining webkit notifications with an example.
For some reason the accepted answer didn't work for me, I ended up using the following example:
https://developer.chrome.com/apps/app_codelab_alarms#create-notification
Check the design and API specification (it's still a draft) or check the source from (page no longer available) for a simple example: It's mainly a call to
window.webkitNotifications.createNotification
.If you want a more robust example (you're trying to create your own Google Chrome's extension, and would like to know how to deal with permissions, local storage and such), check out Gmail Notifier Extension: download the crx file instead of installing it, unzip it and read its source code.
Here is nice documentation on APIs,
https://developer.chrome.com/apps/notifications
And, official video explanation by Google,
https://developers.google.com/live/shows/83992232-1001