HTML5-Desktop-Notifications
HTML5-Desktop-Notifications copied to clipboard
Is there some documentation for setting event listeners when using the createNotifications API?
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.