Skip to content
This repository was archived by the owner on Jan 20, 2020. It is now read-only.
This repository was 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

@smokinjoe

Description

@smokinjoe

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions