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

I played a little bit with the Notification API and I have a couple of
suggestions (I tried the chrome implementation with Mozille hacks jsFiddle
http://jsfiddle.net/robnyman/TuJHx/) for improvement (at least
in my view) or a more consistent API as web developer:

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

*Real life usecase example:*I would like to show different content or apply
different logic for someone who didn't explicitly granted permission, but
didn't deny it either, without having to show the confirmation dialog first
and frighten them away.

2.having a collection to iterate over notification instances  (from my page
only).

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)

I would also like to say that this can be a really useful api, and you're
doing a great work with it! thanks everyone for the great job!

Received on Friday, 3 May 2013 15:51:01 UTC