Re: Define return value for cancelled/missing session for startSession/joinSession (#20)

Hi Anssi,

What kind of information would we leak if rejected the promise returned by
the presentation.requestSession() method? I believe it would be helpful for
the page to know if it's not going to connect at some point and better to
get the information from the UA rather than set a timeout by the page
itself.
We don't need to distinguish between when the user explicitly dismissed the
dialog or simply ignores it, but probably need to distinguish between when
there was nothing selected and something was selected but we couldn't
connect.

Thanks,
Anton.

On Mon, Sep 15, 2014 at 2:09 PM, Kostiainen, Anssi <
anssi.kostiainen@intel.com> wrote:

> On 10 Sep 2014, at 20:43, Mark Foltz <notifications@github.com> wrote:
>
> >From [1]:
>
> > avayvod@google.com writes:
> > "Also, what do the function(s) return if the session is not established
> (e.g. user exits the selection UI by dismissing the popup menu or there's
> no existing session to join) ? An uninitialized useless session object? Or
> should we change the return type to a Promise that passes a session to the
> caller if it succeeds?"
>
> Privacy folks tend to think that the APIs should not leak information on
> whether the user dismisses the selection UI or just does nothing. They
> should be handled the same.
>
> >From that perspective, it would be good to use a promise that resolves if
> the session is successfully established, and otherwise do nothing i.e. do
> not reject the promise. We used such a design in the Battery Status API
> (see getBattery() [2]).
>
> Thanks,
>
> -Anssi
>
> [1] https://github.com/webscreens/presentation-api/issues/20
> [2]
> http://www.w3.org/TR/battery-status/#widl-Navigator-getBattery-Promise-BatteryManager
>

Received on Monday, 15 September 2014 17:50:04 UTC