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

[whatwg] Notifications: createTime property

From: Michael Henretty <michael.henretty@gmail.com>
Date: Fri, 14 Feb 2014 14:25:35 -0800
Message-ID: <CAPHzvAFyMQJrf3vOKcWVtnoehRK7GpL1oHAy5ECfWne2JWaLtw@mail.gmail.com>
To: whatwg@lists.whatwg.org
Cc: alissy@mozilla.com
I apologize if this has already been discussed before (I couldn't find
anything in the archives).

It would be extremely useful to have a timestamp property, perhaps
`createTime`, that would get added to the notification object by the
platform when calling `new Notification`. A use case I have in mind is when
a content process wants to manually expire notifications of a certain age,
but did not itself create the original notification and so has no insight
into its age. This would be the case if, for example, the expiration logic
lived in a worker, a different window of the same origin, or in an app that
got killed at some point after calling `new`.

Also, most (if not all) platforms will timestamp the notification message
anyway for use in its display. Here it would be nice if both the platform
and originating content had access to this same timestamp data, so that any
displayed dates or date logic could be in sync.

Are there drawbacks/complexities I'm not thinking about here?


Thanks,
Michael Henretty
Received on Friday, 14 February 2014 22:26:01 UTC

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