- From: Kostiainen, Anssi <anssi.kostiainen@intel.com>
- Date: Mon, 15 Sep 2014 13:09:42 +0000
- To: "public-webscreens@w3.org" <public-webscreens@w3.org>
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 13:10:54 UTC