Re: Updated draft

On Jun 11, 2012, at 9:06 AM, Doug Turner wrote:

> Thanks for making progress on this spec.  We are hoping to implement
> this shortly and deprecate our moz- specific api
> (https://developer.mozilla.org/en/DOM/navigator.mozNotification).
> 
> 1)  Have you considered removing the static requestPermission()?  The
> UA could just trigger some sort of permission dialog/door-hanger when
> the Permission object is created.  I am not sure that having a static
> function gives us anything here.  Implicit permission requests working
> quite well (f.e. geolocation).

The spec does not mention any kind of Permission object being created. And from an earlier discussion [1], we discussed how web sites would not wish to send a test notification to ask for permission. So there needs to be a separate mechanism to handling and requesting permission. Generally, this explicit model is the least ideal model to use [2], but unfortunately it is warranted because of this feature's visual nature.

> 2)  Have you considered moving the title into the options block?  Of
> course, it wouldn't be an options block.  If you did you could do
> something like:
>     new Notification(someExistingObjectThatHasATitleAttribute);

Is there a real compelling use case for this, rather than just saying
new Notification(someExistingObjectThatHasATitleAttribute.title);

> 3)  If you did (2), you may want to consider doing something like:
>    var request = navigator.showNotification();

The latest spec describes that the creation of the Notification already queues up the show task.

Jon

[1] http://lists.w3.org/Archives/Public/public-web-notification/2012Mar/0044.html
[2] http://lists.w3.org/Archives/Public/public-web-notification/2012Mar/0040.html

Received on Monday, 11 June 2012 20:21:37 UTC