Created
February 29, 2012 21:39
-
-
Save 40/1944636 to your computer and use it in GitHub Desktop.
HTML5 Notifications API Implementation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//request permission | |
function askPermission(){ | |
webkitNotifications.requestPermission(testNotification); | |
} | |
//send notification | |
function testNotification(){ | |
var notification = | |
webkitNotifications.createNotification('IMAGE','TITLE','BODY'); | |
notification.show(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment