W3C home > Mailing lists > Public > public-secondscreen@w3.org > June 2015

Re: [presentation-api] Specify behavior when multiple controlling pages are connected to the session

From: Oleg Beletski via GitHub <sysbot+gh@w3.org>
Date: Thu, 11 Jun 2015 12:59:53 +0000
To: public-secondscreen@w3.org
Message-ID: <issue_comment.created-111123958-1434027591-sysbot+gh@w3.org>
Why does `getSessions()` method have to return promise instead of 
simply returning an  array? Do we expect that that call can start some
 time consuming activity?

1. If we allow `getSessions()` to return empty array, then it is only 
about copying of all presentation from the set of the presentation 
known to the user agent into array and returning it. We do not need 
promise in that case.
2. If `getSessions()` has to return array that has at least one 
connected session in it, then it is correct to return a promise.

I actually had in mind only presenting page that was started as a 
result of a call to `startSession` on a controller side and ignoring 
for a while discussion in 
https://github.com/w3c/presentation-api/issues/32.


-- 
GitHub Notif of comment by obeletski
See 
https://github.com/w3c/presentation-api/issues/19#issuecomment-111123958
Received on Thursday, 11 June 2015 12:59:55 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:18:56 UTC