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

Re: [whatwg] Add a |transient| mechanism to the notifications API

From: Vivien Nicolas <vnicolas@mozilla.com>
Date: Wed, 16 Apr 2014 12:37:04 +0200
Message-ID: <534E5D50.5010507@mozilla.com>
To: Anne van Kesteren <annevk@annevk.nl>, Domenic Denicola <domenic@domenicdenicola.com>
Cc: "whatwg@lists.whatwg.org" <whatwg@lists.whatwg.org>


On 15/04/2014 19:46, Anne van Kesteren wrote:
> On Tue, Apr 15, 2014 at 5:12 PM, Domenic Denicola
> <domenic@domenicdenicola.com> wrote:
>>  From my reading of Windows Phone 8.1 reviews, the way they handle this is by allowing applications to remove notifications themselves.
>
> We already have this actually:
>
> var = n = new Notification(...)
> n.onshow = () => setTimeout(() => n.close(), 7000)
>
>
> I guess this would be for the case where you close the window before
> that timer is able to run. Normally that would leave the notification
> in the notification center, but with say a duration member set to
> non-zero it would be removed.
>

It could be done this way as mentioned.
What I'm looking for is a hint for the user agent, so such notifications 
can be displayed differently by the user-agent if it is the one 
rendering notifications, or forwarded to the underlying platform 
notifications API.
Received on Wednesday, 16 April 2014 10:38:30 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:09:28 UTC