W3C home > Mailing lists > Public > whatwg@whatwg.org > October 2014

Re: [whatwg] Notifications and service workers

From: Jonas Sicking <jonas@sicking.cc>
Date: Mon, 6 Oct 2014 01:31:04 -0700
Message-ID: <CA+c2ei-RF1D-O24+n-OhQBC2wcPFHcYC07jW0-Rm5J6JFXTYxA@mail.gmail.com>
To: Anne van Kesteren <annevk@annevk.nl>
Cc: WHAT Working Group <whatwg@whatwg.org>, "Tab Atkins Jr." <jackalmage@gmail.com>, Jake Archibald <jaffathecake@gmail.com>, Andrew Wilson <atwilson@google.com>, Peter Beverloo <beverloo@google.com>
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

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 17:00:24 UTC