W3C home > Mailing lists > Public > public-web-notification@w3.org > July 2012

Re: Extra option for custom information

From: Adrian Yanes <adrian.yanes@nokia.com>
Date: Mon, 30 Jul 2012 10:45:33 +0300
Message-ID: <50163B9D.9040007@nokia.com>
To: <public-web-notification@w3.org>
On 07/30/2012 10:30 AM, ext Anne van Kesteren wrote:
> On Fri, Jul 27, 2012 at 10:35 AM, Adrian Yanes <adrian.yanes@nokia.com> wrote:
>> An extra options in the Notifications Options like:
>>
>> DOMString extra; (another meaningful name is more than welcome)
>>
>> could to this job, this option could be reserved for all of the
>> information that it is not common over all the notifications, but that
>> can be extremely useful at the agent's level in terms of behavior
>> definition.
>>
>> Therefore, the end-user will have the capability to add extra
>> information, like the indication of persistence, timestamps, etc;
>> without to overlap other options such as tag.
> Could you give a more elaborate example as to how you envision this to
> work? I don't get it.
>
>

Let's imagine we want to indicate this notification should be persistent
at the UI level.

The extra field can host any value that the developer wants; the
developer chooses that 'persistent' is the string-flag he will use to
indicate that this notification should now be removed from the queue or
that it requires further interaction (despite onclick, onshow, onerror,
onclose..):

new Notification("New mail from John Doe",
{ tag: 'message1' , extra: 'persistent' }); 


The idea is to provide an extra field content-free that allows other information that can be useful for particular usecases.

Of course same behavior can be achieved in other layers not involving the notification object itself. However, in other notification systems I worked on, I always missed the lack of an option that allows me to add any extra info that I could need in addition to the common fields

Regards,

Adrian.
Received on Monday, 30 July 2012 07:46:57 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 17 December 2012 14:48:28 GMT