Create a simple notification with an icon and the name of the Chrome extension, if they are supplied in manifest.json.
Returns a promise which resolves to the notification id, which you can use in the notify.onClick and notify.onButtonClick events.
constmyId=awaitnotify('This is my notification')notify.onClicked.addListener((clickedId)=>{if(myId===clickedId){console.log('My notification was clicked.')notify.create(options: NotificationOptions)
Returns a promise which resolves to the notification id, which you can use in notification events.
constmyId=awaitnotify.create({message: 'This is my notification',notify.onClicked.addListener((clickedId)=>{if(myId===clickedId){console.log('My notification was clicked.')Other methods and events
All the other methods and events from chrome.notifications are promisified using chrome-promise and assigned to notify, so you can use notify as if it is chrome.notifications with promises. These include the following: