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

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