Skip to content

Instantly share code, notes, and snippets.

@adrianlee
Created June 27, 2012 22:36
Show Gist options
  • Save adrianlee/3007342 to your computer and use it in GitHub Desktop.
Save adrianlee/3007342 to your computer and use it in GitHub Desktop.
/**
* @toc {Data Storage} HTML5 Web Notification
* @namespace This Notification API provides functionality to display notifications to users.
*/
HTMLNotification = {
/**
* @function
* @constructedBy window.webkitNotifications
* @description Creates a new notification object.
* @example
* webNotification = window.webkitNotifications.createHTMLNotification('url of page')
*
* @PB10+
* @BB50+
* @RIPPLE
*/
webkitNotifications : undefined
/**
* @description This function will create a web notification
* @BB50+
* @PB10+
* @RIPPLE
* @param {String} url URL of notification page
*/
createHTMLNotification : function (url) {},
/**
* @description This function will create a simple notification.
* @BB50+
* @PB10+
* @RIPPLE
* @param {String} icon notification icon
* @param {String} title notification title
* @param {String} body notification content
*/
createNotification : function (icon, title, body) {},
/**
* @description This function will set Permission.
* @BB50+
* @PB10+
* @RIPPLE
*/
requestPermission : function () {},
/**
* @description This function will check Permission.
* @BB50+
* @PB10+
* @RIPPLE
*/
checkPermission: function() {},
/**
* @description This function will show notification.
* @BB50+
* @PB10+
* @RIPPLE
*/
show : function() {}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment