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

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

From: Jonas Sicking via GitHub <sysbot+gh@w3.org>
Date: Wed, 21 Oct 2015 21:28:37 +0000
To: public-secondscreen@w3.org
Message-ID: <issue_comment.created-150029303-1445462916-sysbot+gh@w3.org>
I definitely think that we should remove "terminated" connections.

"disconnected" connections can transition back to "connected", right? 
If the other side calls `reconnect()`?

If so, it might make sense to keep them in `connections`. But I don't 
have a strong opinion either way. Though obviously if we remove 
"disconnected" connections from `connections`, we'll have to fire 
`connectionavailable` when they are added back. I would probably have 
a weak preference for that given that I think that many developers are
 not going to do the work to support reconnecting connections. But 
that's definitely a weak preference.

The reason I thought that we had a `connectionavailable` event rather 
than a `change` event is that we already fire `statechange` events on 
connections when they drop out of the connection list. I'm fine either
 way. Either way it's probably worth exposing the newly added/removed 
connection on the event, so that pages don't have to do a diff between
 two arrays to find what the new connection is.

-- 
GitHub Notif of comment by sicking
See 
https://github.com/w3c/presentation-api/issues/201#issuecomment-150029303
Received on Wednesday, 21 October 2015 21:28:39 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 21 October 2015 21:28:40 UTC