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

Re: [whatwg] suggestions for the Notifications API (http://notifications.spec.whatwg.org/)

From: alonn <alonisser@gmail.com>
Date: Sat, 4 May 2013 15:46:21 +0300
Message-ID: <CAN3noj1KpYoH6mL3WnVskB9FKTWPet3ChKmfwpq+qkDbsn7wyQ@mail.gmail.com>
To: Anne van Kesteren <annevk@annevk.nl>
Cc: WHATWG <whatwg@whatwg.org>
On Fri, May 3, 2013 at 7:49 PM, Anne van Kesteren <annevk@annevk.nl> wrote:

> On Fri, May 3, 2013 at 4:48 PM, alonn <alonisser@gmail.com> wrote:
> > 1. Having a way to check for the current permission without initiating a
> > new Notification object first. something like webkit has (I'm not sure
> it's
> > not deprecated) window.webkitNotification.checkPermission()
> > I saw this isn't in the api, and I think having this would be a great
>
> >>That would be Notification.permission. You can request using
> >>Notification.requestPermission(callback).
>
> Actually not, permission exists only on the notification instance . I was
> thinking a class method like requestPermission
>


> > 2.having a collection to iterate over notification instances  (from my
> page
> > only).
>
> We might get this at some point. See the recent notifications threads.
>
>
> > 3.having to set the "title" only when initiating the Notification object,
> > instead in the dictionary NotificationOptions Iooks inconsistent to me.
> my
> > instinctive attempt was to set the title together with the rest of the
> > notification options. but that won't work. I think it belongs there  (or
> at
> > least, also there)
>
> >>Only title is required, basically. It's similar to how new Event()
> behaves.
>


>  I think a more suitable example would be Geolocation api (
> http://dev.w3.org/geo/api/spec-source.html#get-current-position) another
> api that calls functionality outside the browser window.

where all the options are passed in the options dictionary  the title could
default to empty string or "title" like the rest of the options.

and after looking in the geolocation api again I think maybe having a
callback function as a third optional argument to the notification
constructor, instead of attaching an 'onshow' events


>
> --
> http://annevankesteren.nl/
>
Received on Saturday, 4 May 2013 12:46:47 UTC

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