- From: Jonas Sicking <jonas@sicking.cc>
- Date: Fri, 22 Aug 2014 16:55:01 -0700
- To: Anton Vayvod <avayvod@google.com>
- Cc: "Kostiainen, Anssi" <anssi.kostiainen@intel.com>, "Rottsches, Dominik" <dominik.rottsches@intel.com>, "mark a. foltz" <mfoltz@google.com>, Marco Chen <mchen@mozilla.com>, Wesley Johnston <wjohnston@mozilla.com>, "public-webscreens@w3.org" <public-webscreens@w3.org>, Evelyn Hung <ehung@mozilla.com>
On Thu, Aug 21, 2014 at 8:57 AM, Anton Vayvod <avayvod@google.com> wrote: > Each time I see a boolean flag in the parameters list I feel like having two > functions instead with distinctive clear names instead. Maybe have two > functions like this: > > partial interface NavigatorPresentation { > PresentationSession startSession(DOMString url, DOMString sessionId); > PresentationSession joinSession(DOMString url, DOMString sessionId); > } Yes! I like this! > 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? I think returning a Promise is likely going to make for a easier to use API. That makes it very clear when connection has been established, and when connection failed. / Jonas
Received on Friday, 22 August 2014 23:55:58 UTC