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

Re: [presentation-api] PresentationReceiver: rename getConnection() and getConnections()

From: Mounir Lamouri via GitHub <sysbot+gh@w3.org>
Date: Fri, 09 Oct 2015 11:22:00 +0000
To: public-secondscreen@w3.org
Message-ID: <issue_comment.created-146838164-1444389719-sysbot+gh@w3.org>
It seems that it's very easy to shot yourself in the foot in various 
ways with ```waitForNextConnection()```. What about implementing 
```connections``` as a synchronous property with an event notifying 
the page that the property has been updated?

Jonas previously argued that websites might try to get the first 
connection at page load. I'm not sure how much we should care about 
that given that it would obviously be an invalid assumption to think 
that there is a connection available at page load.

We could also propose a library simplifying the API for very basic use
 cases like a one connection with the receiver stopping the 
presentation when the connection is closed. As Anton pointed, we can't
 expect that to be the most common use case but we can help people 
trying to do exactly that by providing them the right framework in 
user space.

At that point, I feel that we will not be able to find an API that 
will ideally match all possibles UC so I think we should fin an API 
that, used correctly, will work for all these UC even if it might 
require more work for some of them.

-- 
GitHub Notif of comment by mounirlamouri
See 
https://github.com/w3c/presentation-api/issues/201#issuecomment-146838164
Received on Friday, 9 October 2015 11:22:02 UTC

This archive was generated by hypermail 2.3.1 : Friday, 9 October 2015 11:22:02 UTC