I’ve noticed in the StackExchange chat, I can now enable Desktop Notifications (which I also use in Gmail and in Google Music). Now I’ve decided I want to be able to do that on my site. I did some Googling, but only found info on Chrome Extensions. How do I make Desktop Notifications in my own site?
EDIT
In the Chrome console, I found the function webkitNotifications.requestPermission(), but calling it doesn’t do anything. I expect it to show the Chrome top bar that asks “Would you like to enable desktop notifications for http://…?”
There is a nice Notification API tutorial at html5rocks.com. Hope this helps!
FYI, the reason why
webkitNotifications.requestPermission()didn’t do anything when you call it is becauseas stated in Notification API Specs. So you may need to implement this method in a user gesture e.g a mouse click, to make it effective: