Skip to content

PagueVeloz/pv-notify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pv-notify

Just a simple wrapper for Notifications API

Install

  • using bower bower install pv-notify
  • using npm npm install pv-notify

API

requestPermission() => Promise: returns a Promise that will be fulfilled when user interacts with your request.

sendNotification(title: String, options?: Object) => Notification|Boolean: returns a Notification object and show it.

getPermission() => Promise: returns a Promise with current status of notifications permission. If not supported, it will throw a Error

addPermissionChangedEvent(Function) => void: adds a listener to permission changed event

removePermissionChangedEvent(Function) => void: removes a listener from permission changed event

Notifications API

About

Just a simple wrapper for Notifications API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published