Re: [whatwg] Notifications: the ability to specify notifications behavior

Den 15-08-2014 kl. 01:54 skrev Michael Henretty:
> On this note, it would be useful if content could query the UA for the
> default behaviors of any notifications it would send. Also, it would be
> nice to know which of these behaviors could be overridden by the "behavior"
> options. Perhaps something like:
> var promise = Notification.getBehaviors();
> promise.then(function (behaviors) {}
> with behaviors looking something like this:
> {
>    "vibrate": {
>      "default": true,
>      "overridable": false
>    },
>    ...
> }
> So, each behavior would have a default (which the system determines through
> platform support and user settings), and whether or not the behavior is
> overridable for the current content script. The way an app could have the
> information necessary to degrade gracefully.

I would rather have the user agent automatically choose a suitable 
fallback if it didn't support the combination of behaviors you 
requested, or if they were disabled by user preferences.

But I think that would require the behaviors to be specified by content 
at a higher level.

/Jesper Kristensen

Received on Saturday, 16 August 2014 17:04:29 UTC