I thought it is cool, thinking of including it in any of my app I plan to do.
Here is the core part of the snippet.
But you have to ask for user permission before displaying the notification. Find the complete tutorial at html5rocks.com
Harsha Bhogle: What you strive to do as a leader? Understand people?
Shane Warne: Look, it is a real difficult one sometimes, as captain, because you want to be their friend. I think it is important to be their friend and let them know. Because once you get their friendship and trust then you can talk direct and be honest with them. If you haven't really built up that trust, you can become a dictator. And there is a big difference between being a dictator and friend. It is a lot easier to accept criticism from you friend or a decision you may not like from a friend.
But you still need to keep that distance as a captain and let them know that you are in charge.