Re: [push-api] Add a PushSubscriptionOptions dictionary with a userVisible option. (#131)

> @@ -641,6 +657,28 @@
>          If there is a need to ask for permission, it needs to be done by invoking the
>          <a><code>subscribe</code></a> method.
>        </p>
> +      <section>
> +        <h2>
> +          <a>PushSubscriptionOptions</a> dictionary
> +        </h2>
> +        <p>
> +          A <a>PushSubscriptionOptions</a> object represents additional options associated with a
> +          <a>push subscription</a>. The <a>user agent</a> MAY consider these options when requesting
> +          <a>express permission</a> from the user. When an option is considered, the <a>user
> +          agent</a> SHOULD enforce it on incoming <a title="push message">push messages</a>.
> +        </p>
> +        <dl title="dictionary PushSubscriptionOptions" class="idl">
> +          <dt>
> +            boolean userVisible = false

No. User agents are free to ignore these options if they have no intention of using it, hence the MAY.

Marking this as required would break forward compatibility. Imagine that Chrome uses `userVisible`, but Firefox ignores it. Instead, they introduce a `timeout` option to limit execution time of incoming push messages. Either we end up with (a) `userVisible` being required and `timeout` being optional - inconsistent, and unnecessary since Firefox doesn't use it, or (b) `userVisible` and `timeout` both being required - consistent, but breaks all current users.

---
Reply to this email directly or view it on GitHub:
https://github.com/w3c/push-api/pull/131/files#r27485665

Received on Tuesday, 31 March 2015 14:48:07 UTC