Re: [whatwg] Notifications: reviving Notification objects

Hi,

Anne wrote, last year:

>>> There are a couple of scenarios
>>> http://notifications.spec.whatwg.org/ does not address at the
>>> moment.
>>>
>>> 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.

>>> B) Instead of navigating to the chat site at a later point, the user
>>> opens the notification center and clicks the notification.

This scenario doesn't arise on OS X for the above reason.

>>> C) User navigates to chat site at a later point, but with a view
>>> that does not show the chat with P. User then opens the notification
>>> center and clicks the notification.

Same here.

>> A requires being able to get the notifications associated with a
>> certain site.

Only on platforms where notifications persist beyond the lifetime of the
originator.

>> 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.

WFM.


Ted

Received on Friday, 9 May 2014 22:02:17 UTC