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

Re: [whatwg] Notifications: reviving Notification objects

From: Anne van Kesteren <annevk@annevk.nl>
Date: Mon, 12 May 2014 13:54:37 +0200
Message-ID: <CADnb78g_8TMAzFn0TNdLJVNHxWkUPgPutH+=XCS3zPfQYL9DjQ@mail.gmail.com>
To: "Edward O'Connor" <eoconnor@apple.com>
Cc: WHATWG <whatwg@lists.whatwg.org>
On Sat, May 10, 2014 at 12:00 AM, Edward O'Connor <eoconnor@apple.com> wrote:
> Anne wrote, last year:
>>>> A) User navigates to chat site. Chat site creates a notification
>>>> from a chat with P while the user does something else. User closes
>>>> chat site and then navigates to chat site at a later point.
> On OS X, when the user closes the chat site in Safari, its notifications
> are removed from Notification Center.

What if you navigate same-origin? Notifications are origin-bound per
the specification.

>>> The idea to address A is:
>>>   Notification.get({tag})
>>> which returns a Promise which is fulfilled with an array of
>>> Notification objects for which tag is tag or all Notification objects
>>> if no tag is defined.
> OK. On platforms which do not persist notifications beyond the lifetime
> of the originator, the Promise returned from Notification.getClones()
> can always resolve immediately with an Array of length 0.

No, if you have two tabs open that would not return an empty array. Or
if you have a worker open, etc.

Received on Monday, 12 May 2014 11:55:03 UTC

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