HTML5-Desktop-Notifications icon indicating copy to clipboard operation
HTML5-Desktop-Notifications copied to clipboard

Is there some documentation for setting event listeners when using the createNotifications API?

Open smokinjoe opened this issue 8 years ago • 0 comments

I'm trying to duplicate something like this,

let note = new Notification(options.title, {
    body: options.body,
    icon: options.icon
});

note.onclick = () => {
  window.focus();
};

with the createNotification method:

let note = notify.createNotification(options.title, {
  body: options.body,
  icon: options.icon
});
note.onclick = () => {
  window.focus();
};

However, the returned note is the polyfill object (not a Notification) object. And I can't define an online directly inside the createNotification method.

I'd like to use the fallbacks implemented with your createNotification API but can't hook into events.

smokinjoe avatar Aug 08 '17 23:08 smokinjoe