Re: [whatwg] Notifications and service workers

On Oct 1, 2014 4:31 AM, "Anne van Kesteren" <annevk@annevk.nl> wrote:
> Combined with dropping the open event, I think I have enough to rework
> the current Notifications API. Is there anything I'm missing?

I just remembered that another thing that came up was the ability to remove
a notification bases on tag. I.e. without having to get a reference to the
notification instance.

This is probably extra helpful if .get() doesn't return non-persistent
notifications. For example to simplify the case when one tab creates a
notification, but then the user opens the same app in another tab. The
newly opened window might want to close any notifications about pending
messages.

This could be accomplished using BroadcastChannel, but would be much
simpler if we had the ability to close directly using a tag.

In fact, the common case when wanting to close a notification is likely one
where you know which tag you want to close, but don't have a reference to a
Notification instance.

/ Jonas

Received on Monday, 6 October 2014 08:31:28 UTC