Skip to content
This repository has been archived by the owner on Jan 20, 2020. It is now read-only.

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

Open
smokinjoe opened this issue Aug 8, 2017 · 0 comments

Comments

@smokinjoe
Copy link

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant