Skip to content
Stephen K edited this page Apr 4, 2014 · 2 revisions

setFallbackFunction(func)

Set what function to call in case HTML5 notifications aren't supported

Parameters

func: Function, The function to call and pass notification options

setShowNotifyFallback(show)

Whether or not to show the fallback regardless of HTML5 notification API

Parameters

show: Boolean, Whether to show the fallback

getPermission()

Get permission to show browser notifications

checkPermission()

See if we have permission to show notifications

Returns

String, Whether or not we have permission to post notifications

notify(options, options.title, options.icon, options.body, options.tag, options.duration)

Show a notification

Parameters

options: Object,

options.title: String, The title of the notification

options.icon: String, The location of the icon to use

options.body: String, The body of the notification

options.tag: String, The tag of the notification

options.duration: Number, How long the message will stay up

Returns

Notification, The created notification

Clone this wiki locally