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

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

From: Anton Vayvod via GitHub <sysbot+gh@w3.org>
Date: Tue, 13 Oct 2015 22:38:20 +0000
To: public-secondscreen@w3.org
Message-ID: <issue_comment.created-147873653-1444775899-sysbot+gh@w3.org>
I see two scenarios here:
- the UA doesn't support the receiver API at all
- the UA doesn't allow the page to become a presentation (e.g. user 
dismissed a permission or something)
Does it make a difference then if there's a property that can be 
undefined or a promise that will be rejected?

If yes, I'm happy with having 
```navigator.presentation.receiver.connections``` as Mounir suggests.
If not, I'm happy with what Jonas suggests.

One thing I'm not happy about in either case though is having 
```connections.connections``` in the IDL. Can we rename the 
```sequence<> connections``` to ```value``` in both cases and maybe 
```Promise<PresentationConnectionList> connections``` to 
```receiver``` in the latter?

So either we have:

```javascript
navigator.presentation.receiver.connections.then(function(connectionsList)
 {
  for (c : connectionsList.value) c.send("Ready to rock!");
};
```

or

```javascript
navigator.presentation.receiver.then(function(connectionsList) {
  for (c : connectionList.connections) c.send("Ready to rock!");
};
```

-- 
GitHub Notif of comment by avayvod
See 
https://github.com/w3c/presentation-api/issues/201#issuecomment-147873653
Received on Tuesday, 13 October 2015 22:38:24 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 13 October 2015 22:38:24 UTC